Skip to content

Telegram bot for tracking scores in group chats playing Wordle

Notifications You must be signed in to change notification settings

ajdajd/wordle-score-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordle-score-bot

Telegram bot for tracking scores in group chats playing Wordle

demo

Add the bot to your Wordle group chat to log everyone's scores in a local CSV file or Google Sheets.

Features and commands

  • /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

Usage guide

  1. 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
  2. Create your bot via the BotFather.

    image

  3. Turn off group privacy to allow reading messages from group chats.

    1. Enter /mybots and select your bot.
    2. Go to Bot Settings > Group Privacy. Select Turn off.

    image

  4. Set the TOKEN variable to your bot's access token in the .env file.

  5. 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.

Google Sheets integration (optional)

  1. Install gspread.
  2. Create a service account for authentication and save it as service_account.json in the root folder. See this for more information.
  3. Create your Google Sheet and share it with the client_email of the service account.
  4. Add SHEET_URL=https://docs.google.com/spreadsheets/d/...' to the .env file.

Weekly leaderboard scheduled message (optional)

  1. Obtain the chat ID of your group. See this SO thread for more information.
  2. Add CHAT_ID=-XXXXXXXXX to the .env file.
  3. Edit constants.py to change time and day of message. The default setting is every Friday at 04:00 (UTC).

About

Telegram bot for tracking scores in group chats playing Wordle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published