Message
Documentation / @discordeno/bot / Message
Interface: Message
Defined in: packages/bot/src/transformers/types.ts:1076
Properties
activity?
optional
activity:MessageActivity
Defined in: packages/bot/src/transformers/types.ts:1078
Sent with Rich Presence-related chat embeds
application?
optional
application:Partial
<Application
>
Defined in: packages/bot/src/transformers/types.ts:1080
Sent with Rich Presence-related chat embeds
applicationId?
optional
applicationId:bigint
Defined in: packages/bot/src/transformers/types.ts:1082
If the message is an Interaction or application-owned webhook, this is the id of the application
attachments?
optional
attachments:Attachment
[]
Defined in: packages/bot/src/transformers/types.ts:1084
Any attached files on this message.
author
author:
User
Defined in: packages/bot/src/transformers/types.ts:1086
The author of this message (not guaranteed to be a valid user) Note: The author object follows the structure of the user object, but is only a valid user in the case where the message is generated by a user or bot user. If the message is generated by a webhook, the author object corresponds to the webhook's id, username, and avatar. You can tell if a message is generated by a webhook by checking for the webhook_id on the message object.
bitfield?
optional
bitfield:ToggleBitfield
Defined in: packages/bot/src/transformers/types.ts:1142
Holds all the boolean values on this message.
call?
optional
call:MessageCall
Defined in: packages/bot/src/transformers/types.ts:1140
The call associated with the message
channelId
channelId:
bigint
Defined in: packages/bot/src/transformers/types.ts:1088
id of the channel the message was sent in
components
components:
Component
[]
Defined in: packages/bot/src/transformers/types.ts:1090
The components related to this message
content
content:
string
Defined in: packages/bot/src/transformers/types.ts:1092
Contents of the message
crossposted
crossposted:
boolean
Defined in: packages/bot/src/transformers/types.ts:1144
Whether this message has been published to subscribed channels (via Channel Following)
editedTimestamp?
optional
editedTimestamp:number
Defined in: packages/bot/src/transformers/types.ts:1094
The timestamp in milliseconds when this message was edited last.
embeds?
optional
embeds:Embed
[]
Defined in: packages/bot/src/transformers/types.ts:1096
Any embedded content
ephemeral
ephemeral:
boolean
Defined in: packages/bot/src/transformers/types.ts:1146
Whether this message is only visible to the user who invoked the Interaction
failedToMentionSomeRolesInThread
failedToMentionSomeRolesInThread:
boolean
Defined in: packages/bot/src/transformers/types.ts:1148
Whether this message failed to mention some roles and add their members to the thread
flags?
optional
flags:ToggleBitfield
Defined in: packages/bot/src/transformers/types.ts:1150
Message flags combined as a bitfield
guildId?
optional
guildId:bigint
Defined in: packages/bot/src/transformers/types.ts:1098
id of the guild the message was sent in Note: For MESSAGE_CREATE and MESSAGE_UPDATE events, the message object may not contain a guild_id or member field since the events are sent directly to the receiving user and the bot who sent the message, rather than being sent through the guild like non-ephemeral messages.
hasThread
hasThread:
boolean
Defined in: packages/bot/src/transformers/types.ts:1152
Whether this message has an associated thread, with the same id as the message
id
id:
bigint
Defined in: packages/bot/src/transformers/types.ts:1100
id of the message
interaction?
optional
interaction:MessageInteraction
Defined in: packages/bot/src/transformers/types.ts:1109
Sent if the message is a response to an Interaction
Deprecated
Deprecated in favor of interactionMetadata
interactionMetadata?
optional
interactionMetadata:MessageInteractionMetadata
Defined in: packages/bot/src/transformers/types.ts:1102
sent if the message is sent as a result of an interaction
isCrosspost
isCrosspost:
boolean
Defined in: packages/bot/src/transformers/types.ts:1154
Whether this message originated from a message in another channel (via Channel Following)
loading
loading:
boolean
Defined in: packages/bot/src/transformers/types.ts:1156
Whether this message is an Interaction Response and the bot is "thinking"
member?
optional
member:Member
Defined in: packages/bot/src/transformers/types.ts:1110
mentionedChannelIds?
optional
mentionedChannelIds:bigint
[]
Defined in: packages/bot/src/transformers/types.ts:1114
Channels specifically mentioned in this message Note: Not all channel mentions in a message will appear in mention_channels. Only textual channels that are visible to everyone in a discoverable guild will ever be included. Only crossposted messages (via Channel Following) currently include mention_channels at all. If no mentions in the message meet these requirements, this field will not be sent.
mentionedRoleIds?
optional
mentionedRoleIds:bigint
[]
Defined in: packages/bot/src/transformers/types.ts:1116
Roles specifically mentioned in this message
mentionedUserIds
mentionedUserIds:
bigint
[]
Defined in: packages/bot/src/transformers/types.ts:1158
The ids of the users who were mentioned in this message.
mentionEveryone
mentionEveryone:
boolean
Defined in: packages/bot/src/transformers/types.ts:1160
Whether this message mentions everyone
mentions?
optional
mentions:User
[]
Defined in: packages/bot/src/transformers/types.ts:1112
Users specifically mentioned in the message Note: The user objects in the mentions array will only have the partial member field present in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based guild channels.
messageReference?
optional
messageReference:MessageReference
Defined in: packages/bot/src/transformers/types.ts:1118
Data showing the source of a crossposted channel follow add, pin or reply message
messageSnapshots?
optional
messageSnapshots:MessageSnapshot
[]
Defined in: packages/bot/src/transformers/types.ts:1125
The message associated with the message_reference
. This is a minimal subset of fields in a message (e.g. author
is excluded.)
nonce?
optional
nonce:string
|number
Defined in: packages/bot/src/transformers/types.ts:1126
pinned
pinned:
boolean
Defined in: packages/bot/src/transformers/types.ts:1162
Whether this message is pinned
poll?
optional
poll:Poll
Defined in: packages/bot/src/transformers/types.ts:1138
A poll!
reactions?
optional
reactions:Reaction
[]
Defined in: packages/bot/src/transformers/types.ts:1128
Reactions on this message.
referencedMessage?
optional
referencedMessage:Message
Defined in: packages/bot/src/transformers/types.ts:1123
The message associated with the message_reference
Note: This field is only returned for messages with a type
of 19
(REPLY). If the message is a reply but the referenced_message
field is not present, the backend did not attempt to fetch the message that was being replied to, so its state is unknown. If the field exists but is null, the referenced message was deleted.
sourceMessageDeleted
sourceMessageDeleted:
boolean
Defined in: packages/bot/src/transformers/types.ts:1164
Whether the source message for this crosspost has been deleted (via Channel Following)
stickerItems?
optional
stickerItems:Pick
<Sticker
,"id"
|"name"
|"formatType"
>[]
Defined in: packages/bot/src/transformers/types.ts:1130
Sent if the message contains stickers
suppressEmbeds
suppressEmbeds:
boolean
Defined in: packages/bot/src/transformers/types.ts:1166
Whether do not include any embeds when serializing this message
suppressNotifications
suppressNotifications:
boolean
Defined in: packages/bot/src/transformers/types.ts:1168
Whether this message will not trigger push and desktop notifications
thread?
optional
thread:Channel
Defined in: packages/bot/src/transformers/types.ts:1134
The thread that was started from this message, includes thread member object
timestamp
timestamp:
number
Defined in: packages/bot/src/transformers/types.ts:1170
The timestamp in milliseconds when this message was created
tts
tts:
boolean
Defined in: packages/bot/src/transformers/types.ts:1172
Whether this was a TTS message.
type
type:
MessageTypes
Defined in: packages/bot/src/transformers/types.ts:1132
Type of message
urgent
urgent:
boolean
Defined in: packages/bot/src/transformers/types.ts:1174
Whether this message came from the urgent message system
webhookId?
optional
webhookId:bigint
Defined in: packages/bot/src/transformers/types.ts:1136
If the message is generated by a webhook, this is the webhook's id