mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-12-01 01:25:07 +08:00
🚧 update cqcode
This commit is contained in:
parent
c3df90c541
commit
41663e1b08
@ -47,6 +47,10 @@ class MessageSegment(BaseMessageSegment):
|
||||
def at(user_id: Union[int, str]) -> "MessageSegment":
|
||||
return MessageSegment("at", {"qq": str(user_id)})
|
||||
|
||||
@staticmethod
|
||||
def contact(type_: str, id: int) -> "MessageSegment":
|
||||
return MessageSegment("contact", {"type": type_, "id": str(id)})
|
||||
|
||||
@staticmethod
|
||||
def contact_group(group_id: int) -> "MessageSegment":
|
||||
return MessageSegment("contact", {"type": "group", "id": str(group_id)})
|
||||
@ -143,7 +147,14 @@ class MessageSegment(BaseMessageSegment):
|
||||
cache: Optional[bool] = None,
|
||||
proxy: Optional[bool] = None,
|
||||
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
|
||||
def reply(id_: int) -> "MessageSegment":
|
||||
|
Loading…
Reference in New Issue
Block a user