mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-30 14:36:41 +00:00 
			
		
		
		
	🚧 update cqcode
This commit is contained in:
		| @@ -47,6 +47,10 @@ class MessageSegment(BaseMessageSegment): | |||||||
|     def at(user_id: Union[int, str]) -> "MessageSegment": |     def at(user_id: Union[int, str]) -> "MessageSegment": | ||||||
|         return MessageSegment("at", {"qq": str(user_id)}) |         return MessageSegment("at", {"qq": str(user_id)}) | ||||||
|  |  | ||||||
|  |     @staticmethod | ||||||
|  |     def contact(type_: str, id: int) -> "MessageSegment": | ||||||
|  |         return MessageSegment("contact", {"type": type_, "id": str(id)}) | ||||||
|  |  | ||||||
|     @staticmethod |     @staticmethod | ||||||
|     def contact_group(group_id: int) -> "MessageSegment": |     def contact_group(group_id: int) -> "MessageSegment": | ||||||
|         return MessageSegment("contact", {"type": "group", "id": str(group_id)}) |         return MessageSegment("contact", {"type": "group", "id": str(group_id)}) | ||||||
| @@ -143,7 +147,14 @@ class MessageSegment(BaseMessageSegment): | |||||||
|                cache: Optional[bool] = None, |                cache: Optional[bool] = None, | ||||||
|                proxy: Optional[bool] = None, |                proxy: Optional[bool] = None, | ||||||
|                timeout: Optional[int] = None) -> "MessageSegment": |                timeout: Optional[int] = None) -> "MessageSegment": | ||||||
|         return MessageSegment("record", {"file": file, "magic": _b2s(magic)}) |         return MessageSegment( | ||||||
|  |             "record", { | ||||||
|  |                 "file": file, | ||||||
|  |                 "magic": _b2s(magic), | ||||||
|  |                 "cache": cache, | ||||||
|  |                 "proxy": proxy, | ||||||
|  |                 "timeout": timeout | ||||||
|  |             }) | ||||||
|  |  | ||||||
|     @staticmethod |     @staticmethod | ||||||
|     def reply(id_: int) -> "MessageSegment": |     def reply(id_: int) -> "MessageSegment": | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user