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_timestampstring | 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_everyone?booleanWhether the message mentions @everyone or @here.
mention_roles?Snowflake[] | nullRole IDs mentioned in the message.
mentions?APIUser[] | nullUsers 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.
tts?booleanWhether the message is text-to-speech.
typeMessageTypeMessage type (see MessageType).
webhook_id?Snowflake | nullWebhook ID if message was sent by a webhook.