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.
- 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
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
-
Clone the repository:
git clone https://github.com/mikiyas-girma/telegram-bot_Webhook cd telegram-bot_Webhook
-
Install dependencies:
pip install -r requirements.txt
-
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
-
Run the
watch.py
script to monitor code modifications for automatically start && restart the server:source .env python watch.py
-
Interact with the Telegram bot by sending commands or uploading files.
Contributions are welcome! If you'd like to contribute to this project, feel free to open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.