This Telegram bot allows users to upload images, which are then automatically uploaded to Te.legra.ph, providing direct links to the uploaded images. The bot also welcomes users with a personalized message and an image when they start a chat.
- Installation
- Usage
- Features
- Dependencies
- Hosting on Heroku
- Hosting on VPS with Docker
- Contributing
- License
- Acknowledgements
To use this bot, follow these steps:
- Clone this repository to your local machine:
git clone https://github.com/your-username/telegram-image-uploader-bot.git
- Install the required Python libraries:
pip install -r requirements.txt
- Set up your Telegram bot token and image path in
config.py
. - Run the bot script:
python bot.py
- Start a chat with the bot on Telegram.
- Send an image to upload it to Te.legra.ph.
- Receive direct links to the uploaded image.
- Upload images to Te.legra.ph and get direct links.
- Personalized welcome message with an image.
- Supports only image file types.
- Telebot: Python library for interacting with the Telegram Bot API.
- Requests: HTTP library for making requests in Python.
To host the bot on Heroku, follow these steps:
- Create a Heroku account if you don't have one already.
- Install the Heroku CLI on your machine.
- Login to Heroku via the CLI using
heroku login
. - Set up your project for deployment (e.g., create a Procfile, requirements.txt, etc.).
- Push your code to a Heroku Git remote.
- Scale your app using the Heroku dashboard or CLI.
For detailed instructions, refer to the official Heroku Documentation for deploying and scaling applications.
To host the bot on a VPS using Docker, follow these steps:
- Install Docker on your VPS by following the official documentation for your operating system.
- SSH into your VPS and clone the bot repository:
git clone https://github.com/your-username/telegram-image-uploader-bot.git
- Build the Docker image:
docker build -t telegram-bot .
- Run the Docker container:
docker run -d --name telegram-bot-container telegram-bot
Contributions are welcome! If you have any suggestions, improvements, or bug fixes, feel free to open an issue or create a pull request.
This project is licensed under the MIT License.
Special thanks to the developers of Telebot and Requests for their excellent libraries.