Coder Social home page Coder Social logo

telegraph_image_uploader's Introduction

Telegram Image Uploader Bot

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.

Table of Contents

Installation

To use this bot, follow these steps:

  1. Clone this repository to your local machine:
git clone https://github.com/your-username/telegram-image-uploader-bot.git
  1. Install the required Python libraries:
pip install -r requirements.txt
  1. Set up your Telegram bot token and image path in config.py.
  2. Run the bot script:
python bot.py

Usage

  • 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.

Features

  • Upload images to Te.legra.ph and get direct links.
  • Personalized welcome message with an image.
  • Supports only image file types.

Dependencies

  • Telebot: Python library for interacting with the Telegram Bot API.
  • Requests: HTTP library for making requests in Python.

Hosting on Heroku

To host the bot on Heroku, follow these steps:

  1. Create a Heroku account if you don't have one already.
  2. Install the Heroku CLI on your machine.
  3. Login to Heroku via the CLI using heroku login.
  4. Set up your project for deployment (e.g., create a Procfile, requirements.txt, etc.).
  5. Push your code to a Heroku Git remote.
  6. Scale your app using the Heroku dashboard or CLI.

For detailed instructions, refer to the official Heroku Documentation for deploying and scaling applications.

Hosting on VPS with Docker

To host the bot on a VPS using Docker, follow these steps:

  1. Install Docker on your VPS by following the official documentation for your operating system.
  2. SSH into your VPS and clone the bot repository:
git clone https://github.com/your-username/telegram-image-uploader-bot.git
  1. Build the Docker image:
docker build -t telegram-bot .
  1. Run the Docker container:
docker run -d --name telegram-bot-container telegram-bot

Contributing

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, feel free to open an issue or create a pull request.

License

This project is licensed under the MIT License.

Acknowledgements

Special thanks to the developers of Telebot and Requests for their excellent libraries.

telegraph_image_uploader's People

Contributors

devilxsam 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.