I have a server where i need to clear the messages of channels for a specific time period. So, I made this simple utility bot which deletes all the messages in the channel.
Visit the docs for creating a discord bot: Discord Developer Docs
-
Install the required packages using pip:
pip install -r requirements.txt
-
Create a .env file in the root directory of the project and paste your DISCORD_BOT_TOKEN:
DISCORD_BOT_TOKEN=your_token_here
-
Run the bot
python main.py