Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/natico/examples/deps.ts>Message

A powerful and customizable framework for Discordeno
Latest
interface Message
Re-export
import { type Message } from "https://deno.land/x/natico@4.0.0-pre.4/examples/deps.ts";

Properties

id: string

id of the message

channelId: string

id of the channel the message was sent in

optional
guildId: string

id of the guild the message was sent in

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.

optional
member: GuildMember

Member properties for this message's author Note: The member object exists in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based guild channels. This allows bots to obtain real-time member data without requiring bots to store member state in memory.

optional
content: string

Contents of the message

timestamp: string

When this message was sent

editedTimestamp: string | null

When this message was edited (or null if never)

tts: boolean

Whether this was a TTS message

mentionEveryone: boolean

Whether this message mentions everyone

optional
mentions: (User & { member?: Partial<GuildMember>; })[]

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.

optional
mentionRoles: string[]

Roles specifically mentioned in this message

optional
mentionChannels: ChannelMention[]

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 lurkable 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.

attachments: Attachment[]

Any attached files

embeds: Embed[]

Any embedded content

optional
reactions: Reaction[]

Reactions to the message

optional
nonce: number | string

Used for validating a message was sent

pinned: boolean

Whether this message is pinned

optional
webhookId: string

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

Type of message

optional
activity: MessageActivity

Sent with Rich Presence-related chat embeds

optional
application: Partial<Application>

Sent with Rich Presence-related chat embeds

optional
applicationId: string

If the message is a response to an Interaction, this is the id of the interaction's application

optional
messageReference: Omit<MessageReference, "failIfNotExists">

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

optional
flags: number

Message flags combined as a bitfield

optional
deprecated
stickers: MessageSticker[]

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

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.

optional
interaction: MessageInteraction

Sent if the message is a response to an Interaction

optional
thread: Omit<Channel, "member"> & { member: ThreadMember; }

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

optional
components: MessageComponents

The components related to this message

optional
stickerItems: MessageStickerItem[]

Sent if the message contains stickers