Telegram Language Bot is a simple and functional assistant designed to help you learn foreign languages or deepen your knowledge of your native one.
The bot uses the Reverso Java API
to collect data for its responses.
Under the hood, this API relies on ZenRows API
for web scraping.
In the root directory of the project, there's a .env
file
where you need to insert your API keys for the project to run:
API_KEY=
BOT_TOKEN=
-
Go to Zenrows and register for a free account (takes about a minute). If you need help, follow this short guide
-
Once you receive the key, add it to .env like so:
API_KEY=Y0u'v3g0tth1s!N0th1ng1s2h4rd1fUn3v3rg1v3up!
-
Open Telegram and start a chat with @BotFather
-
Send the command:
/newbot
- Follow the instructions to choose a name and a unique username (ending in bot)
- Copy the token BotFather provides and add it to .env like:
BOT_TOKEN=123456789:ABCdefGhIjkLmNoPQRstuvWxYz
Once both values are set in your .env, run the bot using Docker:
docker compose up
/start
β The standard command used to start interacting with any Telegram bot. After that, youβll be prompted to select a source and target language./language
β Set the source and target languages. You can change them anytime./translate
β Enables contextual translation mode (default). The bot will look- for how words are used in real context.
/synonyms
β Switches the bot mode. The bot will find synonyms for the word you- send in the source language.
/conjugation
β Switches the bot mode.Send the bot a verb in the source- language, and it will return a full conjugation table.
/help
β Shows information about available commands. (Same as here π)/info
β Shows information about the creator.