Message Resource
Messages represent user-generated content in channels, including text, embeds, attachments, and reactions.Message Object
Structure
Unique message identifier
Channel where the message was sent
User who sent the message (may be null for webhooks)
ID of the message author
Message text content (max 4000 characters)
When the message was sent
When the message was last edited
Message type (see Message Types)
Message flags bitfield (see Message Flags)
Whether @everyone or @here was mentioned
Users mentioned in the message
Roles mentioned in the message
Channels mentioned in the message
Attached files (see Attachments)
Reactions added to the message
Whether the message is pinned
Webhook ID if sent by a webhook
Webhook display name
Webhook avatar hash
Reference to replied message (see Message Reference)
Stickers attached to the message
Version for optimistic concurrency control
Example Message
Message Types
Message Flags
Attachments
Attachments represent uploaded files.Structure
Attachment identifier
Original filename
File size in bytes
CDN URL for the file
Proxied URL for the file
Custom attachment title
Custom attachment description
MIME type of the file
Image/video width in pixels
Image/video height in pixels
Audio/video duration in seconds
Base64 encoded waveform data for audio
Attachment flags (see Attachment Flags)
Attachment Flags
Embeds
Embeds are rich content blocks with structured information.Structure
Embed type:
rich, image, video, article, etc.Embed title (max 256 characters)
Embed description (max 4096 characters)
URL of the embed
Timestamp displayed in the footer
RGB color code
Footer information with
text and icon_urlImage with
url, width, and heightThumbnail with
url, width, and heightVideo with
url, width, and heightProvider with
name and urlAuthor with
name, url, and icon_urlField objects with
name, value, and inlineExample Embed
Message Reference
Message references are used for replies and forwards.ID of the referenced message
ID of the channel containing the message
ID of the guild (null for DMs)
Reference type: 0 (reply), 1 (forward)
Endpoints
Send Message
Message content (max 4000 characters)
Array of embed objects (max 10)
Message reference for replies
Array of sticker IDs to send (max 3)
Message flags
Get Message
Edit Message
New message content
New embed array
New message flags
Delete Message
MANAGE_MESSAGES permission or message ownership.