A modular Discord Bot built with discord.py and Flask for uptime health checks.
- Modular commands & events (Cogs)
- Role management (assign/remove)
- Moderation (bad word filter, logs)
- Fun commands (polls, reply, DM)
- Flask server for Render/UptimeRobot pings
- Logs stored in
discord.log
-
Clone repo:
git clone https://github.com/akibahmed229/discord-bot.git cd discord-bot -
Install deps:
pip install uv uv sync
-
Create
.env:DISCORD_TOKEN=your-token PREFIX=# ANNOUNCE_CHANNEL_ID=1234567890 HOST=0.0.0.0 PORT=1234
-
Run:
python main.py
!hello→ Greet user!assign @user Role→ Assign role (Admin)!remove @user Role→ Remove role (Admin)!secret→ Hidden command (Admin)!dm msg→ Send DM to yourself!reply→ Reply to last message!poll Question→ Create 👍👎 poll!ping→ Check bot latency!invite→ Generates server invite link!serverinfo→ Displays server information!userinfo→ Displays user information!→ Show command list
- Cogs = modular structure for commands/events
- Flask = uptime check endpoint
- Logs → written to
discord.logonly