Message
@discordeno/bot • Docs
Documentation / @discordeno/bot / Message
Interface: Message
Properties
activity?
optional
activity:MessageActivity
Sent with Rich Presence-related chat embeds
Defined in
packages/bot/src/transformers/types.ts:1065
application?
optional
application:Partial
<Application
>
Sent with Rich Presence-related chat embeds
Defined in
packages/bot/src/transformers/types.ts:1067
applicationId?
optional
applicationId:bigint
If the message is an Interaction or application-owned webhook, this is the id of the application
Defined in
packages/bot/src/transformers/types.ts:1069
attachments?
optional
attachments:Attachment
[]
Any attached files on this message.
Defined in
packages/bot/src/transformers/types.ts:1071
author
author:
User
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.
Defined in
packages/bot/src/transformers/types.ts:1073
bitfield?
optional
bitfield:ToggleBitfield
Holds all the boolean values on this message.
Defined in
packages/bot/src/transformers/types.ts:1129
call?
optional
call:MessageCall
The call associated with the message
Defined in
packages/bot/src/transformers/types.ts:1127
channelId
channelId:
bigint
id of the channel the message was sent in
Defined in
packages/bot/src/transformers/types.ts:1075
components
components:
Component
[]
The components related to this message
Defined in
packages/bot/src/transformers/types.ts:1077
content
content:
string
Contents of the message
Defined in
packages/bot/src/transformers/types.ts:1079
crossposted
crossposted:
boolean
Whether this message has been published to subscribed channels (via Channel Following)
Defined in
packages/bot/src/transformers/types.ts:1131
editedTimestamp?
optional
editedTimestamp:number
The timestamp in milliseconds when this message was edited last.
Defined in
packages/bot/src/transformers/types.ts:1081
embeds?
optional
embeds:Embed
[]
Any embedded content
Defined in
packages/bot/src/transformers/types.ts:1083
ephemeral
ephemeral:
boolean
Whether this message is only visible to the user who invoked the Interaction
Defined in
packages/bot/src/transformers/types.ts:1133
failedToMentionSomeRolesInThread
failedToMentionSomeRolesInThread:
boolean
Whether this message failed to mention some roles and add their members to the thread
Defined in
packages/bot/src/transformers/types.ts:1135
flags?
optional
flags:ToggleBitfield
Message flags combined as a bitfield
Defined in
packages/bot/src/transformers/types.ts:1137
guildId?
optional
guildId:bigint
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.
Defined in
packages/bot/src/transformers/types.ts:1085
hasThread
hasThread:
boolean
Whether this message has an associated thread, with the same id as the message
Defined in
packages/bot/src/transformers/types.ts:1139
id
id:
bigint
id of the message
Defined in
packages/bot/src/transformers/types.ts:1087
interaction?
optional
interaction:MessageInteraction
Sent if the message is a response to an Interaction
Deprecated
Deprecated in favor of interactionMetadata
Defined in
packages/bot/src/transformers/types.ts:1096
interactionMetadata?
optional
interactionMetadata:MessageInteractionMetadata
sent if the message is sent as a result of an interaction
Defined in
packages/bot/src/transformers/types.ts:1089
isCrosspost
isCrosspost:
boolean
Whether this message originated from a message in another channel (via Channel Following)
Defined in
packages/bot/src/transformers/types.ts:1141
loading
loading:
boolean
Whether this message is an Interaction Response and the bot is "thinking"
Defined in
packages/bot/src/transformers/types.ts:1143
member?
optional
member:Member
Defined in
packages/bot/src/transformers/types.ts:1097
mentionedChannelIds?
optional
mentionedChannelIds:bigint
[]
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.
Defined in
packages/bot/src/transformers/types.ts:1101
mentionedRoleIds?
optional
mentionedRoleIds:bigint
[]
Roles specifically mentioned in this message
Defined in
packages/bot/src/transformers/types.ts:1103
mentionedUserIds
mentionedUserIds:
bigint
[]
The ids of the users who were mentioned in this message.
Defined in
packages/bot/src/transformers/types.ts:1145
mentionEveryone
mentionEveryone:
boolean
Whether this message mentions everyone
Defined in
packages/bot/src/transformers/types.ts:1147
mentions?
optional
mentions:User
[]
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.
Defined in
packages/bot/src/transformers/types.ts:1099
messageReference?
optional
messageReference:MessageReference
Data showing the source of a crossposted channel follow add, pin or reply message
Defined in
packages/bot/src/transformers/types.ts:1105
messageSnapshots?
optional
messageSnapshots:MessageSnapshot
[]
The message associated with the message_reference
. This is a minimal subset of fields in a message (e.g. author
is excluded.)
Defined in
packages/bot/src/transformers/types.ts:1112
nonce?
optional
nonce:string
|number
Defined in
packages/bot/src/transformers/types.ts:1113
pinned
pinned:
boolean
Whether this message is pinned
Defined in
packages/bot/src/transformers/types.ts:1149
poll?
optional
poll:Poll
A poll!
Defined in
packages/bot/src/transformers/types.ts:1125
reactions?
optional
reactions:Reaction
[]
Reactions on this message.
Defined in
packages/bot/src/transformers/types.ts:1115
referencedMessage?
optional
referencedMessage:Message
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.
Defined in
packages/bot/src/transformers/types.ts:1110
sourceMessageDeleted
sourceMessageDeleted:
boolean
Whether the source message for this crosspost has been deleted (via Channel Following)
Defined in
packages/bot/src/transformers/types.ts:1151
stickerItems?
optional
stickerItems:Pick
<Sticker
,"id"
|"name"
|"formatType"
>[]
Sent if the message contains stickers
Defined in
packages/bot/src/transformers/types.ts:1117
suppressEmbeds
suppressEmbeds:
boolean
Whether do not include any embeds when serializing this message
Defined in
packages/bot/src/transformers/types.ts:1153
suppressNotifications
suppressNotifications:
boolean
Whether this message will not trigger push and desktop notifications
Defined in
packages/bot/src/transformers/types.ts:1155
thread?
optional
thread:Channel
The thread that was started from this message, includes thread member object
Defined in
packages/bot/src/transformers/types.ts:1121
timestamp
timestamp:
number
The timestamp in milliseconds when this message was created
Defined in
packages/bot/src/transformers/types.ts:1157
tts
tts:
boolean
Whether this was a TTS message.
Defined in
packages/bot/src/transformers/types.ts:1159
type
type:
MessageTypes
Type of message
Defined in
packages/bot/src/transformers/types.ts:1119
urgent
urgent:
boolean
Whether this message came from the urgent message system
Defined in
packages/bot/src/transformers/types.ts:1161
webhookId?
optional
webhookId:bigint
If the message is generated by a webhook, this is the webhook's id