A lightweight and fun Discord bot built using Python and discord.py that reacts to digit-only messages with a user-defined emoji. Originally created by Muhammad Rahim and Aatiq.
- Reacts to messages that contain only digits (e.g.,
99,123) with a custom emoji of your choice. - Ignores messages from other bots.
- Built-in support for Discord command extensions (
discord.ext.commands). - Easy to customize the reaction emoji β the π emoji is just the default example.
- Python 3.10+
- discord.py
- python-dotenv
bot/
β
βββ .env # Contains the Discord bot token
βββ bot.py # Main bot logic
βββ README.md # You're reading it!
-
Clone the repository
git clone https://github.com/your-username/your-repo.git cd your-repo -
Install dependencies
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the root directory with the following content:DISCORD_TOKEN=your_discord_bot_token_here
-
Run the bot
python bot.py
By default, the bot reacts with a π emoji.
To change this, simply update the emoji string in the bot.py file:
# Change this line in on_message event
await message.add_reaction('π') # Replace π with any emoji you wantFor example:
await message.add_reaction('π₯')Supports both standard and custom server emojis (make sure your bot has access to custom emojis).
User: 22
Bot: reacts with π (or your selected emoji)
User: hello22
Bot: does nothing
Feel free to open issues or submit pull requests for improvements or bug fixes.