Go to file
2022-01-10 07:51:31 +05:30
.env.sample Modified readme for sqlite support 2022-01-10 07:51:31 +05:30
.gitignore First commit 2022-01-09 08:25:50 +05:30
readme.md Modified readme for sqlite support 2022-01-10 07:51:31 +05:30
requirements.txt Added env file sample and requirements.txt for easy cloning 2022-01-09 08:46:26 +05:30
word_bot.py added support for sqlite database 2022-01-10 07:44:40 +05:30
wordbot.sqlite added support for sqlite database 2022-01-10 07:44:40 +05:30

Telegram WordBot

This bot helps you learn new words for your GRE/GMAT preparations. All you have to do is start a chat with the @random_gre_word_bot and send /word. WordBot will respond with a randomly selected word, its grammatical type, and its definition. You'll also have the option of fetching the pronunciation and synonyms if you wish.

To run the bot on your own server

  1. Open Telegram and create a bot using @BotFather
  2. Get the bot's token
  3. Clone this repository
  4. Rename .env.sample to .env
  5. Add all the values in the .env file including the bot token
  6. Install all the addons from requirements.txt
  7. Start the bot with the command python word_bot.py

Database

Postgres and Sqlite databases are supported by the script natively. The included sqlite database will work out of the box. For connecting to sqlite, only the database file name is required, which is already provided in the .env.sample file. Hence, no changes to the database section will be required for sqlite.

If you wish to use PostgreSQL database, change the value of the DATABASE key in the .env file to postgres. Make sure you also populate the rest of the values for the database. In case of postgres, the DB_FILE variable will be ignored.

Have fun learning random words!

To-do

  1. Complete synonyms functionality
  2. Add the ability to fetch specific words
  3. Get a complete list of words (current list is less common words only)
  4. Linkify synonyms