Discord bot: commands, plugins, custom commands
git clone https://github.com/nickjones-01f2/discord-tool.git
cd discord-tool
pip install -r requirements.txtThis bot comes packed with features:
- Slash Commands: Modern and easy to use.
- Auto-Modeion: Keeps your server clean.
- Custom Commands: Add your own commands easily.
- Role Management: Automate role assignments.
- Logging: Tracks important events in your server.
- Music: Plays music (WIP - still needs some work).
Make sure you've got Python 3.11 or newer. You'll also need git installed to clone the repo. pip comes with Python, usually. If not, Google it!
After installing, fire it up with:
python main.pyThe bot will connect to Discord using the token you set in config.py. So, set that first.
- Bot not connecting: Double-check your bot token. Make sure it's correct and you haven't accidentally included any extra spaces.
- Commands not working: Ensure the bot has the necessary permissions in your server. Also, verify that the command prefix is set correctly in
config.py. - Auto-mod expected behaviors: Adjust the auto-modeion settings to be less aggressive. The thresholds might be too low. This is in
modules.pyfor now. TODO: Move to config.## FAQ
How do I get my bot token?
Go to the Discord Developer Portal, create an application, then create a bot user. The token will be there. Keep it secret!The bot isn't joining my server. What's wrong?
You need to genee an invite link with the correct permissions. Again, the Discord Developer Portal is your friend. Make sure you've enabled the "PRESENCE INTENT", "SERVER MEMBERS INTENT", and "MESSAGE CONTENT INTENT" in the Bot tab.Can I add my own modules?
Yep! Just drop them into the `modules/` directory and make sure they're properly formatted. Check out the existing modules for examples.The config.py file is where you set everything up. It's pretty straightforward. Here's an example:
BOT_TOKEN = "YOUR_BOT_TOKEN_HERE"
COMMAND_PREFIX = "!"
LOG_CHANNEL_ID = 123456789012345678
AUTO_MOD_ENABLED = True
MOD_ROLE_ID = 987654321098765432
MUSIC_VOLUME = 0.5
DATABASE_PATH = "data/discord_tool.db"BOT_TOKEN: Get this from the Discord Developer Portal. It's how your bot logs in.COMMAND_PREFIX: What you type before a command (like!help).LOG_CHANNEL_ID: Where the bot sends logs. Make a channel, then copy its ID.AUTO_MOD_ENABLED: Turn auto-modeion on or off (True/False).MOD_ROLE_ID: ID of the modeor role.MUSIC_VOLUME: Default music volume (0.0 to 1.0).DATABASE_PATH: Where the bot stores its data.
💪 Community-driven development