Telegram bot for tracking scores in group chats playing Wordle
Add the bot to your Wordle group chat to log everyone's scores in a local CSV file or Google Sheets.
/recap- Get the leaderboards of the last two Wordle editions./weekly- Get the leaderboard of the past week.- Google Sheets integration (optional)
- TODO: Monthly leaderboards
-
Clone this repo and install
requirements.txt.$ git clone git@github.com:ajdajd/wordle-score-bot.git $ cd wordle-score-bot $ pip install -r requirements.txt -
Create your bot via the BotFather.
-
Turn off group privacy to allow reading messages from group chats.
- Enter
/mybotsand select your bot. - Go to
Bot Settings>Group Privacy. SelectTurn off.
- Enter
-
Set the
TOKENvariable to your bot's access token in the.envfile. -
Run
bot.py.$ python bot.py
or
$ nohup python -u bot.py &to keep it running in the background.
Messages received starting with Wordle XXX Y/6 will be logged into scores.csv. It will be created automatically if not yet existing.
- Install
gspread. - Create a service account for authentication and save it as
service_account.jsonin the root folder. See this for more information. - Create your Google Sheet and share it with the
client_emailof the service account. - Add
SHEET_URL=https://docs.google.com/spreadsheets/d/...'to the.envfile.
- Obtain the chat ID of your group. See this SO thread for more information.
- Add
CHAT_ID=-XXXXXXXXXto the.envfile. - Edit
constants.pyto change time and day of message. The default setting is every Friday at 04:00 (UTC).


