Interface

APIMessage

Full message object from GET /channels/{id}/messages, POST /channels/{id}/messages, PATCH, or gateway MESSAGE_CREATE.

Properties

NameTypeDescription
attachments?APIMessageAttachment[] | nullFile attachments.
authorAPIUserAuthor of the message.
call?APIMessageCall | nullCall info when type is MessageType.Call.
channel_idSnowflakeChannel containing the message.
contentstringMessage text content.
edited_timestamp?string | nullISO-8601 timestamp when the message was last edited (null if never edited).
embeds?APIEmbed[] | nullEmbeds attached to the message.
flagsnumberMessageFlags bitfield (see MessageFlags).
guild_id?Snowflake | nullGuild containing the message (if guild message).
idSnowflakeMessage ID.
member?APIGuildMember | nullAuthor's guild member object (gateway MESSAGE_CREATE only, when guild message).
mention_channels?Array<{ id: Snowflake; guild_id: Snowflake; name: string; type: number; }> | nullChannels mentioned that are visible to @everyone.
mention_everyonebooleanWhether the message mentions @everyone or @here.
mention_rolesSnowflake[]Role IDs mentioned in the message.
mentionsAPIUser[]Users mentioned in the message.
message_reference?APIMessageReference | nullReply/forward reference (see APIMessageReference).
message_snapshots?APIMessageSnapshot[] | nullSnapshots of forwarded messages.
nonce?string | nullClient-generated unique ID for deduplication.
pinnedbooleanWhether the message is pinned.
reactions?APIMessageReaction[] | nullReactions to the message.
referenced_message?APIMessage | nullReferenced message (for replies, when available).
stickers?APIMessageSticker[] | nullStickers in the message.
timestampstringISO-8601 timestamp when the message was sent.
ttsbooleanWhether the message is text-to-speech.
typeMessageTypeMessage type (see MessageType).
users?APIUser[] | nullUsers referenced from non-notifying content (client resolution).
webhook_id?Snowflake | nullWebhook ID if message was sent by a webhook.