No description
  • Python 92.2%
  • Nix 7.8%
Find a file
s-prechtl d0a79a7951
All checks were successful
/ deploy (push) Successful in 24s
debug: log all bot/app messages before filters
2026-06-08 20:04:57 +02:00
.forgejo/workflows ci: add Forgejo Actions deploy workflow 2026-06-08 09:50:38 +02:00
cogs fix: wait_until_ready in backfill, numpy in flake, avg_score solved-only, chart error handling 2026-06-02 18:35:13 +02:00
tests feat: parse plain-text @mentions and /share messages 2026-06-08 09:51:53 +02:00
.env.example feat: project setup with config and dependencies 2026-06-02 14:23:50 +02:00
.envrc feat: replace venv with nix flake 2026-06-02 18:24:31 +02:00
.gitignore chore: add .gitignore 2026-06-03 10:02:30 +02:00
backfill.py fix: check embeds for share/summary text, not just message.content 2026-06-08 18:45:10 +02:00
bot.py debug: log all bot/app messages before filters 2026-06-08 20:04:57 +02:00
charts.py feat: chart generation and /chart command with weekly auto-post 2026-06-02 18:21:14 +02:00
config.py feat: project setup with config and dependencies 2026-06-02 14:23:50 +02:00
database.py feat: sqlite schema with scores and backfill_status tables 2026-06-02 14:35:03 +02:00
flake.lock feat: replace venv with nix flake 2026-06-02 18:24:31 +02:00
flake.nix feat: add NixOS module with systemd service and secrets management 2026-06-02 22:20:04 +02:00
module.nix fix: remove deploy script from module (belongs in dotfiles) 2026-06-08 18:37:02 +02:00
parser.py feat: parse plain-text @mentions and /share messages 2026-06-08 09:51:53 +02:00
pytest.ini feat: sqlite schema with scores and backfill_status tables 2026-06-02 14:35:03 +02:00
queries.py feat: parse plain-text @mentions and /share messages 2026-06-08 09:51:53 +02:00
README.md docs: setup and deployment instructions 2026-06-02 18:28:09 +02:00
requirements.txt feat: project setup with config and dependencies 2026-06-02 14:23:50 +02:00
streaks.py feat: streak computation for play and solve streaks 2026-06-02 15:07:07 +02:00

Wordle Bot

Discord bot that tracks daily Wordle scores from the Wordle app summary messages.

Setup

1. Create the Discord bot

  1. Go to https://discord.com/developers/applications
  2. Click New Application, name it "Wordle Bot"
  3. Go to Bot → click Add Bot
  4. Under Privileged Gateway Intents, enable:
    • Server Members Intent
    • Message Content Intent
  5. Copy the token — you'll need it in step 3
  6. Go to OAuth2 → URL Generator:
    • Scopes: bot, applications.commands
    • Bot Permissions: Read Messages/View Channels, Read Message History, Send Messages, Embed Links, Attach Files
  7. Open the generated URL to invite the bot to your server

2. Enter the dev shell

nix develop

3. Configure environment

cp .env.example .env
# Edit .env and set DISCORD_TOKEN=your_token_here

4. Run the bot

python bot.py

On first run the bot will backfill all historical messages from both channels. This may take a few minutes.

Slash Commands

Command Description
/leaderboard [period] Score leaderboard (7d / 30d / all time)
/shame [period] Most X/6 failures
/stats [@user] Personal stats with streaks
/history [@user] Last 15 results
/today Most recent day's results
/versus @user1 @user2 Head-to-head comparison
/chart distribution [@user] Score distribution bar chart
/chart timeline @user Score over time
/chart weekly Weekly average comparison

A weekly summary chart is automatically posted to #wordle every Monday at 9:00 AM UTC.

Deployment (VPS)

Run as a systemd service. Create /etc/systemd/system/wordle-bot.service:

[Unit]
Description=Wordle Discord Bot
After=network.target

[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/wordle-bot
EnvironmentFile=/path/to/wordle-bot/.env
ExecStart=nix develop --command python bot.py
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Then:

sudo systemctl enable wordle-bot
sudo systemctl start wordle-bot
sudo journalctl -u wordle-bot -f