Skip to main content

DiscordSocialSDKMessage

Documentation


Documentation / @discordeno/types / DiscordSocialSDKMessage

Interface: DiscordSocialSDKMessage

Defined in: discord/webhookEvents.ts:163

https://docs.discord.com/developers/events/webhook-events#message-object

Extends

Properties

activity?

optional activity?: DiscordMessageActivity

Defined in: discord/message.ts:67

Sent with Rich Presence-related chat embeds

Inherited from

DiscordMessage.activity


application?

optional application?: Partial<DiscordApplication>

Defined in: discord/message.ts:69

Sent with Rich Presence-related chat embeds

Inherited from

DiscordMessage.application


application_id?

optional application_id?: string

Defined in: discord/message.ts:71

if the message is an Interaction or application-owned webhook, this is the id of the application

Inherited from

DiscordMessage.application_id


attachments

attachments: DiscordAttachment[]

Defined in: discord/message.ts:53

Any attached files

Inherited from

DiscordMessage.attachments


author

author: DiscordUser

Defined in: discord/message.ts:30

The author of this message (not guaranteed to be a valid user)

Remarks

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.

Inherited from

DiscordMessage.author


call?

optional call?: DiscordMessageCall

Defined in: discord/message.ts:113

The call associated with the message

Inherited from

DiscordMessage.call


channel

channel: DiscordChannel

Defined in: discord/webhookEvents.ts:167

Channel object with recipient information


channel_id

channel_id: string

Defined in: discord/message.ts:23

id of the channel the message was sent in

Inherited from

DiscordMessage.channel_id


components?

optional components?: DiscordMessageComponents

Defined in: discord/message.ts:96

The components related to this message

Inherited from

DiscordMessage.components


content

content: string

Defined in: discord/message.ts:32

Contents of the message

Inherited from

DiscordMessage.content


edited_timestamp

edited_timestamp: string | null

Defined in: discord/message.ts:36

When this message was edited (or null if never)

Inherited from

DiscordSocialSDKMessage.edited_timestamp


embeds

embeds: DiscordEmbed[]

Defined in: discord/message.ts:55

Any embedded content

Inherited from

DiscordMessage.embeds


flags?

optional flags?: MessageFlags

Defined in: discord/message.ts:73

Message flags combined as a bitfield

Inherited from

DiscordMessage.flags


guild_id?

optional guild_id?: string

Defined in: discord/gateway.ts:729

ID of the guild the message was sent in - unless it is an ephemeral message

Inherited from

DiscordMessageCreateExtra.guild_id


id

id: string

Defined in: discord/message.ts:21

id of the message

Inherited from

DiscordMessage.id


interaction?

optional interaction?: DiscordMessageInteraction

Defined in: discord/message.ts:92

Sent if the message is a response to an Interaction

Deprecated

Deprecated in favor of interaction_metadata

Inherited from

DiscordMessage.interaction


interaction_metadata?

optional interaction_metadata?: DiscordMessageInteractionMetadata

Defined in: discord/message.ts:86

sent if the message is sent as a result of an interaction

Inherited from

DiscordMessage.interaction_metadata


lobby_id?

optional lobby_id?: string

Defined in: discord/webhookEvents.ts:165

ID of the lobby where the message was created (only present in Linked Channel messages)


member?

optional member?: Partial<DiscordMemberWithUser>

Defined in: discord/gateway.ts:731

Member properties for this message's author. Missing for ephemeral messages and messages from webhooks

Inherited from

DiscordMessageCreateExtra.member


mention_channels?

optional mention_channels?: DiscordChannelMention[]

Defined in: discord/message.ts:51

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.

Inherited from

DiscordMessage.mention_channels


mention_everyone

mention_everyone: boolean

Defined in: discord/message.ts:40

Whether this message mentions everyone

Inherited from

DiscordMessage.mention_everyone


mention_roles

mention_roles: string[]

Defined in: discord/message.ts:46

Roles specifically mentioned in this message

Inherited from

DiscordMessage.mention_roles


mentions?

optional mentions?: DiscordUser & object[]

Defined in: discord/gateway.ts:733

Users specifically mentioned in the message

Inherited from

DiscordMessageCreateExtra.mentions


message_reference?

optional message_reference?: Omit<DiscordMessageReference, "failIfNotExists">

Defined in: discord/message.ts:75

Data showing the source of a crosspost, channel follow add, pin, or reply message

Inherited from

DiscordMessage.message_reference


message_snapshots?

optional message_snapshots?: DiscordMessageSnapshot[]

Defined in: discord/message.ts:77

The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.)

Inherited from

DiscordMessage.message_snapshots


nonce?

optional nonce?: string | number

Defined in: discord/message.ts:59

Used for validating a message was sent

Inherited from

DiscordSocialSDKMessage.nonce


pinned

pinned: boolean

Defined in: discord/message.ts:61

Whether this message is pinned

Inherited from

DiscordMessage.pinned


poll?

optional poll?: DiscordPoll

Defined in: discord/message.ts:111

The poll object

Inherited from

DiscordMessage.poll


position?

optional position?: number

Defined in: discord/message.ts:105

A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread, it can be used to estimate the relative position of the message in a thread in company with total_message_sent on parent thread

Inherited from

DiscordMessage.position


reactions?

optional reactions?: DiscordReaction[]

Defined in: discord/message.ts:57

Reactions to the message

Inherited from

DiscordMessage.reactions


referenced_message?

optional referenced_message?: DiscordMessage | null

Defined in: discord/message.ts:84

The message associated with the 'message_reference'

Remarks

This field is only returned for messages with a 'type' of '19', '21', or '23'. If the message is one of these 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.

Inherited from

DiscordSocialSDKMessage.referenced_message


resolved?

optional resolved?: DiscordInteractionDataResolved

Defined in: discord/message.ts:109

data for users, members, channels, and roles referenced in this message

Inherited from

DiscordMessage.resolved


role_subscription_data?

optional role_subscription_data?: DiscordRoleSubscriptionData

Defined in: discord/message.ts:107

data of the role subscription purchase or renewal that prompted this ROLE_SUBSCRIPTION_PURCHASE message

Inherited from

DiscordMessage.role_subscription_data


sticker_items?

optional sticker_items?: DiscordStickerItem[]

Defined in: discord/message.ts:98

Sent if the message contains stickers

Inherited from

DiscordMessage.sticker_items


stickers?

optional stickers?: DiscordSticker[]

Defined in: discord/message.ts:103

The stickers sent with the message (bots currently can only receive messages with stickers, not send)

Deprecated

Inherited from

DiscordMessage.stickers


thread?

optional thread?: Omit<DiscordChannel, "member"> & object

Defined in: discord/message.ts:94

The thread that was started from this message, includes thread member object

Type Declaration

member

member: DiscordThreadMember

Inherited from

DiscordMessage.thread


timestamp

timestamp: string

Defined in: discord/message.ts:34

When this message was sent

Inherited from

DiscordMessage.timestamp


tts

tts: boolean

Defined in: discord/message.ts:38

Whether this was a TTS message

Inherited from

DiscordMessage.tts


type

type: MessageTypes

Defined in: discord/message.ts:65

Type of message

Inherited from

DiscordMessage.type


webhook_id?

optional webhook_id?: string

Defined in: discord/message.ts:63

If the message is generated by a webhook, this is the webhook's id

Inherited from

DiscordMessage.webhook_id