Interface
APIMessage
Full message object from GET /channels/{id}/messages, POST /channels/{id}/messages, PATCH, or gateway MESSAGE_CREATE.
Properties
| Name | Type | Description |
|---|---|---|
| attachments? | APIMessageAttachment[] | null | File attachments. |
| author | APIUser | Author of the message. |
| call? | APIMessageCall | null | Call info when type is MessageType.Call. |
| channel_id | Snowflake | Channel containing the message. |
| content | string | Message text content. |
| edited_timestamp? | string | null | ISO-8601 timestamp when the message was last edited (null if never edited). |
| embeds? | APIEmbed[] | null | Embeds attached to the message. |
| flags | number | MessageFlags bitfield (see MessageFlags). |
| guild_id? | Snowflake | null | Guild containing the message (if guild message). |
| id | Snowflake | Message ID. |
| member? | APIGuildMember | null | Author's guild member object (gateway MESSAGE_CREATE only, when guild message). |
| mention_channels? | Array<{ id: Snowflake; guild_id: Snowflake; name: string; type: number; }> | null | Channels mentioned that are visible to @everyone. |
| mention_everyone | boolean | Whether the message mentions @everyone or @here. |
| mention_roles | Snowflake[] | Role IDs mentioned in the message. |
| mentions | APIUser[] | Users mentioned in the message. |
| message_reference? | APIMessageReference | null | Reply/forward reference (see APIMessageReference). |
| message_snapshots? | APIMessageSnapshot[] | null | Snapshots of forwarded messages. |
| nonce? | string | null | Client-generated unique ID for deduplication. |
| pinned | boolean | Whether the message is pinned. |
| reactions? | APIMessageReaction[] | null | Reactions to the message. |
| referenced_message? | APIMessage | null | Referenced message (for replies, when available). |
| stickers? | APIMessageSticker[] | null | Stickers in the message. |
| timestamp | string | ISO-8601 timestamp when the message was sent. |
| tts | boolean | Whether the message is text-to-speech. |
| type | MessageType | Message type (see MessageType). |
| users? | APIUser[] | null | Users referenced from non-notifying content (client resolution). |
| webhook_id? | Snowflake | null | Webhook ID if message was sent by a webhook. |