A self hosted dictionary for Telegram. This bot uses a dictionary API to look up words and send you the definitions.
This bot uses:
-
PyDictionary - For definitions
-
WordHoard - For synonyms and antonyms
-
Python-Telegram-Bot - API Wrapper for Telegram written in Python
/start - Start the bot
/help - Get help and info
/source - Get the source code (this page)
/define - Define a word
/synonym - Get the synonym(s) of a word
/antonym - Get the antonym(s) of a word
-
Creat a new bot with @Botfather and grab the API key.
-
Copy/rename .env-example to .env and place your API key in there in between the double quotes.
-
Setup a virtual environment and activate it.
-
Install requirements via
pip install -r requirements.txt
in your virtual environment -
Run
python3 bot.py
-
Connect repository to account either through Heroku CLI or github
-
In Config Vars add a new Key (API_Token) and Value (Your API Key)
-
Deploy
-
Connect repository to account
-
Add you
API_Key
as an environment variable -
Deploy