Delete Message
Delete Message
Overview
A context menu command that allows users to delete messages by right-clicking them. Users can delete their own messages or, with proper permissions, delete messages from other users.
Syntax
Right-click a message → Apps → Delete Message
Parameters
This context menu command doesn't take any parameters as it operates directly on the selected message.
Response
The command provides ephemeral (only visible to the command user) responses:
- Success: "Message deleted successfully."
- Error messages when:
- Used outside a cached server
- Message not found
- Lacking permissions
- Technical failure
Permissions
Bot Needs:
- Message.Delete - Ability to delete messages
User Needs:
- Delete own messages: No special permissions
- Delete others' messages:
MANAGE_MESSAGES
permission
Common Issues
Error | Cause | Solution |
---|---|---|
"This command can only be used in a server with message caching enabled." | Command used in DMs or uncached server | Use the command in a proper server channel |
"The targeted message could not be found." | Message was deleted or not accessible | Try again with an existing message |
"I do not have permission to delete this message." | Bot lacks required permissions | Give the bot 'Manage Messages' permission |
"You do not have permission to delete this message." | User lacks required permissions | Get 'Manage Messages' permission or only delete your own messages |
Notes
- The command works on any message in channels the bot can see
- Users can always delete their own messages
- Server admins can configure who has message deletion permissions
- Messages older than 14 days may not be deletable by the bot
Last Updated: 2024-03-21**