A custom Discord bot for the πΏSilverLeafπΏ guild community.
Features include:
- π Auto-greetings in #introduce channel
- π Welcome messages for new members
- βοΈ Slash commands for guild management (roles, intro channel, status)
- π Rotating bot status every 5 minutes
- π‘οΈ Basic moderation commands (kick, ban)
- Python 3.10 or higher
- A Discord bot token (from Discord Developer Portal)
- (Optional) Git for version control
git clone https://github.com/archytech99/silverleaf-bot.git
cd silverleaf-botpython -m venv venv
source venv/bin/activate # Linux/macOS
venv\\Scripts\\activate # Windows PowerShellpip install -r requirements.txtCreate a .env file in the project root:
DISCORD_TOKEN=your_discord_bot_token_herepython silverleaf-bot.pyFor auto-restart on file changes:
pip install watchdog
watchmedo auto-restart --pattern="*.py;*.env" --recursive -- .venv/bin/python silverleaf-bot.py[Unit]
Description=SilverLeaf Discord Bot
After=network.target
[Service]
Type=simple
WorkingDirectory=/your-path/silverleaf-bot
ExecStart=/your-path/silverleaf-bot/.venv/bin/python silverleaf-bot.py
Restart=on-failure
User=youruser
Environment=\"DISCORD_TOKEN=your_token_here\"
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable silverleaf-bot
sudo systemctl start silverleaf-botsudo systemctl restart silverleaf-bot
sudo systemctl status silverleaf-bot
journalctl -u silverleaf-bot -f- /guild setintrochannel #channel β set introduction channel
- /guild removeintrochannel β clear intro channel
- /guild addrole @user @role β add role to member
- /guild removerole @user @role β remove role
- /guild setstatus [type] [message] β set bot status (playing, watching, listening, competing, custom)