Message
Documentation / @discordeno/bot / Message
Interface: Message
Defined in: transformers/types.ts:1324
Properties
activity?
optionalactivity?:MessageActivity
Defined in: transformers/types.ts:1326
Sent with Rich Presence-related chat embeds
application?
optionalapplication?:Partial<Application>
Defined in: transformers/types.ts:1328
Sent with Rich Presence-related chat embeds
applicationId?
optionalapplicationId?:bigint
Defined in: transformers/types.ts:1330
If the message is an Interaction or application-owned webhook, this is the id of the application
attachments?
optionalattachments?:Attachment[]
Defined in: transformers/types.ts:1332
Any attached files on this message.
author
author:
User
Defined in: transformers/types.ts:1334
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?
optionalbitfield?:ToggleBitfield
Defined in: transformers/types.ts:1394
Holds all the boolean values on this message.
call?
optionalcall?:MessageCall
Defined in: transformers/types.ts:1390
The call associated with the message
channelId
channelId:
bigint
Defined in: transformers/types.ts:1336
id of the channel the message was sent in
channelType?
optionalchannelType?:ChannelTypes
Defined in: transformers/types.ts:1362
The type of channel the message was sent in. Only present when received from the gateway MESSAGE_CREATE event
components
components:
Component[]
Defined in: transformers/types.ts:1338
The components related to this message
content
content:
string
Defined in: transformers/types.ts:1340
Contents of the message
crossposted
crossposted:
boolean
Defined in: transformers/types.ts:1396
Whether this message has been published to subscribed channels (via Channel Following)
editedTimestamp?
optionaleditedTimestamp?:number
Defined in: transformers/types.ts:1342
The timestamp in milliseconds when this message was edited last.
embeds?
optionalembeds?:Embed[]
Defined in: transformers/types.ts:1344
Any embedded content
ephemeral
ephemeral:
boolean
Defined in: transformers/types.ts:1398
Whether this message is only visible to the user who invoked the Interaction
failedToMentionSomeRolesInThread
failedToMentionSomeRolesInThread:
boolean
Defined in: transformers/types.ts:1400
Whether this message failed to mention some roles and add their members to the thread
flags?
optionalflags?:ToggleBitfield
Defined in: transformers/types.ts:1402
Message flags combined as a bitfield
guildId?
optionalguildId?:bigint
Defined in: transformers/types.ts:1346
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: transformers/types.ts:1404
Whether this message has an associated thread, with the same id as the message
id
id:
bigint
Defined in: transformers/types.ts:1348
id of the message
interaction?
optionalinteraction?:MessageInteraction
Defined in: transformers/types.ts:1357
Sent if the message is a response to an Interaction
Deprecated
Deprecated in favor of interactionMetadata
interactionMetadata?
optionalinteractionMetadata?:MessageInteractionMetadata
Defined in: transformers/types.ts:1350
sent if the message is sent as a result of an interaction
isCrosspost
isCrosspost:
boolean
Defined in: transformers/types.ts:1406
Whether this message originated from a message in another channel (via Channel Following)
loading
loading:
boolean
Defined in: transformers/types.ts:1408
Whether this message is an Interaction Response and the bot is "thinking"
member?
optionalmember?:Member
Defined in: transformers/types.ts:1358
mentionedChannelIds?
optionalmentionedChannelIds?:bigint[]
Defined in: transformers/types.ts:1364
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?
optionalmentionedRoleIds?:bigint[]
Defined in: transformers/types.ts:1366
Roles specifically mentioned in this message
mentionedUserIds
mentionedUserIds:
bigint[]
Defined in: transformers/types.ts:1410
The ids of the users who were mentioned in this message.
mentionEveryone
mentionEveryone:
boolean
Defined in: transformers/types.ts:1412
Whether this message mentions everyone
mentions?
optionalmentions?:User[]
Defined in: transformers/types.ts:1360
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?
optionalmessageReference?:MessageReference
Defined in: transformers/types.ts:1368
Data showing the source of a crossposted channel follow add, pin or reply message
messageSnapshots?
optionalmessageSnapshots?:MessageSnapshot[]
Defined in: transformers/types.ts:1375
The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)
nonce?
optionalnonce?:string|number
Defined in: transformers/types.ts:1376
pinned
pinned:
boolean
Defined in: transformers/types.ts:1414
Whether this message is pinned
poll?
optionalpoll?:Poll
Defined in: transformers/types.ts:1388
A poll!
reactions?
optionalreactions?:Reaction[]
Defined in: transformers/types.ts:1378
Reactions on this message.
referencedMessage?
optionalreferencedMessage?:Message
Defined in: transformers/types.ts:1373
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.
resolved?
optionalresolved?:InteractionDataResolved
Defined in: transformers/types.ts:1428
data for users, members, channels, and roles referenced in this message
sharedClientTheme?
optionalsharedClientTheme?:SharedClientTheme
Defined in: transformers/types.ts:1392
The custom client-side theme shared via the message
sourceMessageDeleted
sourceMessageDeleted:
boolean
Defined in: transformers/types.ts:1416
Whether the source message for this crosspost has been deleted (via Channel Following)
stickerItems?
optionalstickerItems?:Pick<Sticker,"id"|"name"|"formatType">[]
Defined in: transformers/types.ts:1380
Sent if the message contains stickers
suppressEmbeds
suppressEmbeds:
boolean
Defined in: transformers/types.ts:1418
Whether do not include any embeds when serializing this message
suppressNotifications
suppressNotifications:
boolean
Defined in: transformers/types.ts:1420
Whether this message will not trigger push and desktop notifications
thread?
optionalthread?:Channel
Defined in: transformers/types.ts:1384
The thread that was started from this message, includes thread member object
timestamp
timestamp:
number
Defined in: transformers/types.ts:1422
The timestamp in milliseconds when this message was created
tts
tts:
boolean
Defined in: transformers/types.ts:1424
Whether this was a TTS message.
type
type:
MessageTypes
Defined in: transformers/types.ts:1382
Type of message
urgent
urgent:
boolean
Defined in: transformers/types.ts:1426
Whether this message came from the urgent message system
webhookId?
optionalwebhookId?:bigint
Defined in: transformers/types.ts:1386
If the message is generated by a webhook, this is the webhook's id