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 [email protected]: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
/mybots
and select your bot. - Go to
Bot Settings
>Group Privacy
. SelectTurn off
.
- Enter
-
Set the
TOKEN
variable to your bot's access token in the.env
file. -
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.json
in the root folder. See this for more information. - Create your Google Sheet and share it with the
client_email
of the service account. - Add
SHEET_URL=https://docs.google.com/spreadsheets/d/...'
to the.env
file.
- Obtain the chat ID of your group. See this SO thread for more information.
- Add
CHAT_ID=-XXXXXXXXX
to the.env
file. - Edit
constants.py
to change time and day of message. The default setting is every Friday at 04:00 (UTC).