Edit message
discord_
Write
- Toolset
- Messages
messages - Discord permissions
- View Channel and Read Message History
- Context cost
- 257 tokens, estimated1,026 bytes of definition, divided by 4
Edit the text content of a message previously sent by this bot. Discord forbids editing other users' messages, so this fails for non-bot messages. Use discord_ for embed messages. Works in text channels and threads. Requires the View Channel and Read Message History permissions. Returns the edited message ID.
Risk and annotations
Read-onlyreadOnlyHint | no | Can modify your server. |
|---|---|---|
DestructivedestructiveHint | no | Declared non-destructive. |
IdempotentidempotentHint | yes | Repeating the call with the same arguments has no 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 edit. Must be a message authored by this bot. |
| contentrequired | string | none | New plain-text content that fully replaces the existing content (max 2000 characters). |
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 -
Add reaction, Write
discord_add_ reaction -
List channel threads, Read-only
discord_list_ channel_ threads -
Create thread, Write
discord_create_ thread -
Bulk delete messages, Destructive
discord_bulk_ delete_ messages -
Send embed, Write
discord_send_ embed -
Send multiple embeds, Write
discord_send_ multiple_ embeds -
Delete message, Destructive
discord_delete_ message -
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,026 bytes)
{
"name": "discord_edit_message",
"description": "Edit the text content of a message previously sent by this bot. Discord forbids editing other users' messages, so this fails for non-bot messages. Use discord_edit_embed for embed messages. Works in text channels and threads. Requires the View Channel and Read Message History permissions. Returns the edited message ID.",
"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 edit. Must be a message authored by this bot."
},
"content": {
"type": "string",
"description": "New plain-text content that fully replaces the existing content (max 2000 characters)."
}
},
"required": [
"channel_id",
"message_id",
"content"
],
"additionalProperties": false
},
"annotations": {
"title": "Edit message",
"readOnlyHint": false,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}
}