Giter Club home page Giter Club logo

telegram-bot_webhook's Introduction

Flask Telegram Bot with Auto-restart

This project is a Flask application integrated with a Telegram bot. The bot can handle various commands and file uploads from users. Additionally, the project includes a script for automatically restarting the server when code modifications are detected.

Features

  • Integration of a Telegram bot with Flask application
  • Handling various commands and file uploads from users
  • Auto-restart functionality for the server upon code modifications

Prerequisites

Before running the application, ensure you have the following:

  • Python 3.x installed
  • Required Python packages installed (install using pip install -r requirements.txt)
  • Telegram bot token and webhook URL set up (configure in the .env file) in the project directory

Installation

  1. Clone the repository:

    git clone https://github.com/mikiyas-girma/telegram-bot_Webhook
    cd telegram-bot_Webhook
  2. Install dependencies:

    pip install -r requirements.txt
  3. Configure environment variables:

    Create a .env file in the project root directory and add the following variables:

    BOT_TOKEN=your_bot_token_here
    WEBHOOK_URL=your_webhook_url_here

Usage

  1. Run the watch.py script to monitor code modifications for automatically start && restart the server:

    source .env
    
    python watch.py
  2. Interact with the Telegram bot by sending commands or uploading files.

Contributing

Contributions are welcome! If you'd like to contribute to this project, feel free to open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

telegram-bot_webhook's People

Contributors

mikiyas-girma avatar

Watchers

 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.