We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
作为消息数组 Message 的成员,纯文本消息与非纯文本消息并列。
def photo(file: str) -> "MessageSegment": return MessageSegment("photo", {"file": file})
bot.send(event, MessageSegment.photo(file="image.png"))
Event 提供类原生的 telegram_model 字段
telegram_model
Photo 等非纯文本消息作为 Event 字段与纯文本消息数组 Message 独立
class MessageEvent(Event): ... photo: Optional[List[PhotoSize]] ... class PhotoSize(BaseModel): file_id: str file_unique_id: str width: int height: int file_size: Optional[int]
bot.send(event, photo="image.png")
The text was updated successfully, but these errors were encountered:
#47
Sorry, something went wrong.
No branches or pull requests
类 OneBot(当前)
作为消息数组 Message 的成员,纯文本消息与非纯文本消息并列。
发送
bot.send(event, MessageSegment.photo(file="image.png"))
其他
Event 提供类原生的
telegram_model
字段类原生(废弃)
Photo 等非纯文本消息作为 Event 字段与纯文本消息数组 Message 独立
发送
bot.send(event, photo="image.png")
The text was updated successfully, but these errors were encountered: