Initial commit - refactored Discord bot with security fixes

This commit is contained in:
2026-01-13 16:03:54 -05:00
commit f0339058fc
5 changed files with 1290 additions and 0 deletions

61
README.md Normal file
View File

@@ -0,0 +1,61 @@
# Lotus Discord Bot
Discord bot for the Lotus Guild server with auto-deployment from Gitea.
## Features
- Daily adjective posting
- Minecraft server whitelist management
- Custom LLM integration (Lotus LLM)
- Fun commands (8ball, fortune, dice, etc.)
- Game-specific commands (Valorant agents, LoL champions)
- Server audit logging
- Reaction roles
## Auto-Deployment Setup
The bot automatically deploys when code is pushed to Gitea.
### Deployment Components
1. **Webhook Listener**: Runs on port 9000 on the production server
2. **Deployment Script**: `/usr/local/bin/discord_bot_deploy.sh`
3. **Service**: `discord.service` runs the bot
### Webhook Configuration
- **Endpoint**: `http://10.10.10.6:9000/hooks/discord-bot-deploy`
- **Secret**: `discord-bot-secret`
- **Header**: `X-Gitea-Signature`
### Manual Deployment
If needed, you can manually trigger deployment:
```bash
ssh root@10.10.10.6
/usr/local/bin/discord_bot_deploy.sh
```
## Production Server
- **Host**: 10.10.10.6
- **Bot Directory**: `/mnt/discordBot/`
- **Service**: `discord.service`
- **User**: jared
## Local Development
The bot requires:
- Python 3
- discord.py
- python-dotenv
- aiohttp
- mcrcon
Environment variables in `.env`:
- `DISCORD_TOKEN`
## Commands
Run `/help` in Discord to see all available commands.