This bot allows administrators to clear all messages in a specific Discord channel using the !clearall
command. It also sends a confirmation message, which automatically deletes after 5 seconds.
- Command:
!clearall
– Deletes all messages in the current channel. - Only users with administrator permissions can execute the command.
- Python 3.8+
discord.py
library
- Clone this repository or download the source code.
- Install the required dependencies:
pip install discord.py
- Replace
'TOKEN'
in the source code with your bot's token.
- Run the bot using the following command:
python bot.py
- In any channel where the bot has permissions, use
!clearall
to delete all messages.
Ensure the bot has the following permissions in the server:
- Manage Messages
- Send Messages
This project is open-source. Feel free to modify and distribute it as needed.
!clearall