Giter VIP home page Giter VIP logo

cron-telebot's Introduction

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 — fast api 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 initialize the FastAPI endpoints (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 -k uvicorn.workers.UvicornWorker --timeout 60. 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.

cron-telebot's People

Contributors

hsdevelops1 avatar huishun98 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.