A Wordle-inspired Discord bot that brings the popular word-guessing game to your server! Players try to guess a 5-letter word within 6 attempts, with color-coded feedback for each guess.
/guessle- Start a new game/guess <word>- Make a guess in your current game/status- Check your current game status/giveup- End your current game and reveal the word
/leaderboard- View the server's overall leaderboard/monthly- View the current month's leaderboard- Tracks:
- Words successfully guessed
- Total games played
- Win rate percentage
- 6 attempts to guess a 5-letter word
- Color-coded feedback:
- ๐ฉ Green: Correct letter in correct position
- ๐จ Yellow: Correct letter in wrong position
- โฌ Gray: Letter not in the word
- Validates guesses against a dictionary
- Custom emoji support for feedback
- Clone the repository:
git clone https://github.com/yourusername/guessle.git
cd guessle- Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with your Discord bot token:
DISCORD_TOKEN=your_bot_token_here
PORT=8080 # Optional: Change if needed
- Run the bot:
python bot.py- Python 3.8 or higher
- discord.py >= 2.3.2
- python-dotenv >= 1.0.0
- aiohttp >= 3.9.1
- pyspellchecker >= 0.7.2
Contributions are welcome! Feel free to submit issues and pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions, please open an issue in the repository.
Made with โค๏ธ by friedeggyolkie (Discord) / junadizon (GitHub)
- 1. Setting Up EC2 Instance
- 2. Connecting to EC2
- 3. Bot Deployment
- 4. Monitoring and Maintenance
- 5. Security Best Practices
- 6. Cost Optimization
- Go to AWS Console โ EC2
- Click "Launch Instance"
- Configure instance:
- Name:
guessle-bot - AMI: Amazon Linux 2023
- Instance type: t2.micro (free tier)
- Key pair: Create new (save .pem file)
- Network settings:
- Allow SSH (port 22)
- Allow HTTP (port 8080)
- Storage: 8GB (free tier)
- Name:
Create security group guessle-bot-sg with rules:
- Inbound:
- SSH (22): 0.0.0.0/0
- HTTP (8080): 0.0.0.0/0
- HTTPS (443): 0.0.0.0/0
- Outbound:
- All traffic: 0.0.0.0/0
- Save your .pem file securely
- Set correct permissions:
chmod 400 guessle-bot.pemssh -i guessle-bot.pem ec2-user@YOUR_INSTANCE_PUBLIC_IP# Update system
sudo yum update -y
# Install required packages
sudo yum install python3 python3-pip git -y# Create and enter directory
mkdir guessle-bot
cd guessle-bot
# Clone repository
git clone YOUR_REPOSITORY_URL .
# Install dependencies
pip3 install -r requirements.txt- Create .env file:
nano .env- Add required variables:
DISCORD_TOKEN=your_discord_token_here
DATABASE_URL=your_database_url_here
PORT=8080
- Set permissions:
chmod 600 .env- Create service file:
sudo nano /etc/systemd/system/guessle-bot.service- Add service configuration:
[Unit]
Description=Guessle Discord Bot
After=network.target
[Service]
Type=simple
User=ec2-user
WorkingDirectory=/home/ec2-user/guessle-bot
ExecStart=/usr/bin/python3 bot.py
Restart=always
RestartSec=10
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=multi-user.target- Enable and start service:
sudo systemctl daemon-reload
sudo systemctl enable guessle-bot
sudo systemctl start guessle-bot# Check service status
sudo systemctl status guessle-bot
# View logs
sudo journalctl -u guessle-bot -f# Restart bot
sudo systemctl restart guessle-bot
# Stop bot
sudo systemctl stop guessle-bot
# Start bot
sudo systemctl start guessle-bot- Check logs for errors:
sudo journalctl -u guessle-bot -n 50- Verify environment variables:
cat .env- Test web server:
curl http://localhost:8080/health- Keep .pem file secure
- Regularly update system:
sudo yum update -y - Monitor AWS CloudWatch for instance metrics
- Set up AWS Budget alerts
- Use IAM roles instead of hardcoded credentials
- Use AWS Free Tier monitoring
- Set up auto-shutdown during inactive periods
- Monitor usage in AWS Billing Console
- Set up AWS Budget alerts
- Check environment variables:
cat .env- Check logs:
sudo journalctl -u guessle-bot -f- Verify Python installation:
python3 --version- Verify security group settings
- Check instance status in AWS Console
- Ensure .pem file permissions are correct
- Verify your IP is allowed in security group
- Verify DATABASE_URL in .env
- Check database security settings
- Ensure database is accessible from EC2