import { type DiscordMessage } from "https://dotland.deno.dev/x/discordeno@18.0.1/plugins/helpers/deps.ts";
Properties
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.
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.
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.
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.
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.
Data showing the source of a crossposted channel follow add, pin or reply message
The stickers sent with the message (bots currently can only receive messages with stickers, not send)
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.
The thread that was started from this message, includes thread member object