Skip to content

A telegram bot that schedules recurring messages

License

Notifications You must be signed in to change notification settings

Jh123x/cron-telebot

Repository files navigation

Recurring Messages

Recurring Messages (@cron_telebot) is a Telegram bot that schedules recurring Telegram messages. ✨

Refer to our user guide for usage instructions.

Noteworthy files

  1. main.py — telegram bot, to add/delete/view the recurring jobs
  2. api.py — flask app, ping the endpoint to trigger check and send all required messages
  3. config.py — all the configurations you need to change for the bot
  4. mongo.py — handles interaction with the mongo database

Prerequisites

  1. Telegram bot created with @botfather
  2. Existing MongoDB

Note: The latest version does not support Google Sheets as a database anymore. Please refer to the gsheets branch (no longer maintained) if you would like to use Google Sheets for your database.

Running locally

  1. Configure environment variables. See config.py for the required environment variables and how you can get them.

  2. Install Python and pip and set up virtual environment.

    virtualenv venv
    source venv/bin/activate
    pip install -r requirements.txt
    
  3. Start services. Run python main.py to start the telegram bot. On another terminal, run python api.py to start the Flask endpoint (base path is /api).

Running in production

  1. Configure environment variables. See config.py for the required environment variables and how you can get them.
    • Remember to set the ENV environment variable to any value of your choice (e.g. dev, uat, prod)
  2. Entrypoint is gunicorn main:app. No need to run bot and api separately.

Contributing

If you're looking for a way to contribute, you can scan through our existing issues for something to work on. See the contributing guide for detailed instructions on how to get started with our project.

License

The project is licensed under a GNU GENERAL PUBLIC LICENSE license.

About

A telegram bot that schedules recurring messages

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%