Skip to content

Interface: Message

消息对象。

Properties

animation?

optional animation: unknown

动画对象。

Defined in

src/typings/message.ts:49


audio?

optional audio: Audio

音频对象

Defined in

src/typings/message.ts:51


author_signature?

optional author_signature: string

Unused

Defined in

src/typings/message.ts:36


caption?

optional caption: string

标题。

Defined in

src/typings/message.ts:65


caption_entities?

optional caption_entities: MessageEntity[]

Unused

Defined in

src/typings/message.ts:67


channel_chat_created?

optional channel_chat_created: true

Unused

Defined in

src/typings/message.ts:95


chat

chat: Chat

消息所在聊天。

Defined in

src/typings/message.ts:14


contact?

optional contact: Contact

联系人对象。

Defined in

src/typings/message.ts:69


date

date: number

消息发送时间(unix 时间戳)。

Defined in

src/typings/message.ts:12


delete_chat_photo?

optional delete_chat_photo: true

Unused

Defined in

src/typings/message.ts:89


dice?

optional dice: Dice

骰子对象。

Defined in

src/typings/message.ts:71


document?

optional document: Document

文件对象。

Defined in

src/typings/message.ts:53


edit_date?

optional edit_date: number

消息的最后编辑时间(unix 时间戳)。

Defined in

src/typings/message.ts:32


entities?

optional entities: MessageEntity[]

消息的中实体对象。

对于文本消息,包括但不限于:

  • @ 的用户
  • 识别到的 url
  • 机器人命令

Defined in

src/typings/message.ts:47


forward_date?

optional forward_date: number

转发消息时,原消息的发送时间(unix 时间戳)。

Defined in

src/typings/message.ts:26


forward_from?

optional forward_from: User

Unused

Defined in

src/typings/message.ts:16


forward_from_chat?

optional forward_from_chat: Chat

Unused

Defined in

src/typings/message.ts:18


forward_from_message_id?

optional forward_from_message_id: bigint

Unused

Defined in

src/typings/message.ts:20


forward_sender_name?

optional forward_sender_name: string

Unused

Defined in

src/typings/message.ts:24


forward_signature?

optional forward_signature: string

Unused

Defined in

src/typings/message.ts:22


from?

optional from: User

消息发送者。

Defined in

src/typings/message.ts:10


game?

optional game: unknown

游戏对象

Defined in

src/typings/message.ts:73


group_chat_created?

optional group_chat_created: true

Unused

Defined in

src/typings/message.ts:91


invoice?

optional invoice: unknown

Unused

Defined in

src/typings/message.ts:103


left_chat_member?

optional left_chat_member: User

如果是用户退出服务器的通知消息,表示退出的用户。

Defined in

src/typings/message.ts:83


location?

optional location: Location

位置对象

Defined in

src/typings/message.ts:79


media_group_id?

optional media_group_id: string

Unused

Defined in

src/typings/message.ts:34


message_id

message_id: bigint

消息唯一 ID。

Defined in

src/typings/message.ts:8


migrate_from_chat_id?

optional migrate_from_chat_id: bigint

Unused

Defined in

src/typings/message.ts:99


migrate_to_chat_id?

optional migrate_to_chat_id: bigint

Unused

Defined in

src/typings/message.ts:97


new_chat_members?

optional new_chat_members: User[]

如果是用户进入服务器的通知消息,表示进入的用户。

Defined in

src/typings/message.ts:81


new_chat_photo?

optional new_chat_photo: unknown[]

Unused

Defined in

src/typings/message.ts:87


new_chat_title?

optional new_chat_title: string

Unused

Defined in

src/typings/message.ts:85


photo?

optional photo: unknown[]

图片对象。

Defined in

src/typings/message.ts:55


pinned_message?

optional pinned_message: Message

Unused

Defined in

src/typings/message.ts:101


poll?

optional poll: Poll

投票对象。

Defined in

src/typings/message.ts:75


reply_markup?

optional reply_markup: unknown

内联键盘。

Defined in

src/typings/message.ts:107


reply_to_message?

optional reply_to_message: Message

回复消息时,原消息对象。

Defined in

src/typings/message.ts:28


sticker?

optional sticker: unknown

Unused

Defined in

src/typings/message.ts:57


successful_payment?

optional successful_payment: unknown

Unused

Defined in

src/typings/message.ts:105


supergroup_chat_created?

optional supergroup_chat_created: true

是否是 supergroup 创建通知。

Defined in

src/typings/message.ts:93


text?

optional text: string

消息的文本内容(最大 102400KB)。

Defined in

src/typings/message.ts:38


venue?

optional venue: Venue

场所对象.

Defined in

src/typings/message.ts:77


via_bot?

optional via_bot: User

是否机器人发送的消息。

Defined in

src/typings/message.ts:30


video?

optional video: Video

视频对象。

Defined in

src/typings/message.ts:59


video_note?

optional video_note: VideoNote

videonote 对象。

Defined in

src/typings/message.ts:61


voice?

optional voice: Voice

语音对象。

Defined in

src/typings/message.ts:63

Released under the MIT License.