Scheduled Messages
Scheduled messages are messages queued to be sent at a future timestamp.
Scheduled Message Object
Represents a message queued to be sent later.
Scheduled Message Structure
| Field | Type | Description |
|---|---|---|
| user_id | snowflake | The ID of the user who scheduled the message |
| scheduled_message_id | snowflake | The ID of the scheduled message |
| send_at_timestamp | ISO8601 timestamp | When the message will be sent |
| scheduled_message | scheduled message data object | The message data to send |
| state | integer | The current state of the scheduled message |
| attachment_uploads? | array[scheduled attachment upload object] | Uploaded attachments for the message |
Scheduled Message Data Structure
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the destination channel |
| content | string | The message content |
| type | integer | The type of message |
| flags | integer | The message flags |
| message_reference | ?message reference object | The message reference |
Scheduled Attachment Upload Structure
| Field | Type | Description |
|---|---|---|
| filename | string | The original filename |
| uploaded_filename | string | The uploaded attachment filename |
| description? | ?string | The attachment description |
| title? | ?string | The attachment title |
Endpoints
Create Scheduled Message
POST/users/@me/scheduled-messagesCreates a scheduled message. Returns a scheduled message object on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| channel_id | snowflake | The ID of the channel |
| content | string | The content |
| scheduled_timestamp | integer | The scheduled timestamp |
| flags | integer | The flags |
| message_reference | object | The message reference |
| allowed_mentions | object | The allowed mentions |
| attachments? | object | The attachments |
List Scheduled Messages
GET/users/@me/scheduled-messagesReturns a list of scheduled message objects.
Modify Scheduled Message
PATCH/users/@me/scheduled-messages/{scheduled-message.id}Modifies a scheduled message. Returns the updated scheduled message object on success.
JSON Params
| Field | Type | Description |
|---|---|---|
| scheduled_timestamp | integer | The scheduled timestamp |
| content | string | The content |
| flags | integer | The flags |
Delete Scheduled Message
DELETE/users/@me/scheduled-messages/{scheduled-message.id}Cancels and deletes a scheduled message. Returns a 204 empty response on success.