Delete message
discord_
Destructive
- Toolset
- Messages
messages - Discord permissions
- View Channel and Read Message HistoryManage Messages when deleting another user's message also
- Context cost
- 264 tokens, estimated1,055 bytes of definition, divided by 4
Permanently delete one specific message. IRREVERSIBLE. Requires the View Channel and Read Message History permissions to find the message. The bot can then delete its own messages; deleting another user's message also requires the Manage Messages permission. Use discord_ to remove many at once. Discord does not record a reason for a single message delete in the audit log.
Risk and annotations
Read-onlyreadOnlyHint | no | Can modify your server. |
|---|---|---|
DestructivedestructiveHint | yes | May perform destructive updates, so clients can ask before running it. |
IdempotentidempotentHint | no | Repeating the call can have an additional effect. |
Open worldopenWorldHint | yes | Interacts with an external system: Discord. |
Annotations are hints the server declares. Clients use them to decide when to ask you before a call.
Parameters
| Parameter | Type | Rules | Description |
|---|---|---|---|
| channel_ | string | pattern ^\d{17,20}$ | ID (snowflake) of the channel or thread containing the message. |
| message_ | string | pattern ^\d{17,20}$ | ID of the message to delete. |
| reasonoptional | string | none | Optional. Not recorded: Discord keeps no audit log reason for a single message delete. |
Output
This tool declares no output schema. Its description says what it returns; this page shows no example rather than invent one.
Related tools
Named in its description
Also in Messages
-
Read messages, Read-only
discord_read_ messages -
Send message, Write
discord_send_ message -
Reply to message, Write
discord_reply_ message -
Edit message, Write
discord_edit_ message -
Add reaction, Write
discord_add_ reaction -
List channel threads, Read-only
discord_list_ channel_ threads -
Create thread, Write
discord_create_ thread -
Send embed, Write
discord_send_ embed -
Edit embed, Write
discord_edit_ embed -
Send multiple embeds, Write
discord_send_ multiple_ embeds -
Pin or unpin message, Write
discord_pin_ message -
Search messages, Read-only
discord_search_ messages -
Search guild messages, Read-only
discord_search_ guild_ messages -
Crosspost message, Write
discord_crosspost_ message -
Remove reactions, Destructive
discord_remove_ reactions -
Get reactions, Read-only
discord_get_ reactions -
Get message attachments, Read-only
discord_get_ message_ attachments -
Fetch pinned messages, Read-only
discord_fetch_ pinned_ messages -
Forward message, Write
discord_forward_ message
Raw definition (1,055 bytes)
{
"name": "discord_delete_message",
"description": "Permanently delete one specific message. IRREVERSIBLE. Requires the View Channel and Read Message History permissions to find the message. The bot can then delete its own messages; deleting another user's message also requires the Manage Messages permission. Use discord_bulk_delete_messages to remove many at once. Discord does not record a reason for a single message delete in the audit log.",
"inputSchema": {
"type": "object",
"properties": {
"channel_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "ID (snowflake) of the channel or thread containing the message."
},
"message_id": {
"type": "string",
"pattern": "^\\d{17,20}$",
"description": "ID of the message to delete."
},
"reason": {
"description": "Optional. Not recorded: Discord keeps no audit log reason for a single message delete.",
"type": "string"
}
},
"required": [
"channel_id",
"message_id"
],
"additionalProperties": false
},
"annotations": {
"title": "Delete message",
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true
}
}