Skip to content

mdncv/bot_for_m

Repository files navigation

Bot for M

This is an asynchronous Telegram bot that helps you memorize words while learning a new language in a quiz format.

Quick start

  1. Get your Telegram bot token from BotFather.

  2. cd to an acceptable directory for this project.

  3. Clone repository to the directory using git:

git clone https://github.com/mdncv/bot_for_m.git
  1. Add the .env file to the project (.example.env might help you).

Variables of configuration:

Name Type Example Description
TOKEN String "0123456789:SoMeSyMbOlShErE-Q" Telegram bot token
POSTGRES_DB String "postgres" Database name
POSTGRES_USER String "postgres" Database user
POSTGRES_HOST String "postgres" Database host
POSTGRES_PASSWORD String "1234" Database password
REDIS_HOST String "redis" Redis host

P.S. For the love of God, use strong passwords por favor.
P.P.S. These hosts examples are for docker-compose use only. Use the standard option (something like 127.0.0.1 or 0.0.0.0) in case you are running services separately.

  1. Run services using docker-compose:
docker-compose up -d --build

P.S. Use sudo to fix the error with mounting database volume (or run the terminal as administrator).

  1. Find your bot using Telegram search, click START button and enjoy!

  2. In case you want to stop services:

docker-compose stop

P.S. Use down instead of stop to remove containers and networks if needed.

Usage

  1. Select the language you are learning and your native language by typing language codes:

For example: It and then: En

  1. Add words by clicking add.

  2. Remove words by clicking remove.

  3. Start quiz by clicking quiz. Choose the correct answer from four possible. The quiz goes on repeatedly. You can return to menu by clicking menu.

  4. See your stats by clicking stats.

  5. You can get back to initial settings by typing /start. After choosing the languages you will be asked if you want to reset the database (delete user words/stats).

Contributing

Bug reports and/or pull requests are welcome :)

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published