Giter VIP home page Giter VIP logo

filestreambot's Introduction

๐ŸŒFile Stream Bot

An open-source Python Telegram bot to transmit Telegram files over HTTP.

Demo Bot


๐Ÿ“‘ INDEX

โš™๏ธ Installation

1.Install Python & Git:

For Windows:

winget install Python.Python.3.11
winget install Git.Git

For Linux:

sudo apt-get update && sudo apt-get install -y python3.11 git pip

For macOS:

brew install [email protected] git

For Termux:

pkg install python -y
pkg install git -y

2.Download repository:

git clone https://github.com/TheCaduceus/FileStreamBot.git

3.Change Directory:

cd FileStreamBot

4.Install requirements:

pip install -r requirements.txt

๐Ÿ“ Variables

The variables provided below should either be completed within the config.py file or configured as environment variables.

  • API_ID|TELEGRAM_API_ID: API ID of your Telegram account, can be obtained from My Telegram. int
  • API_HASH|TELEGRAM_API_HASH: API hash of your Telegram account, can be obtained from My Telegram. str
  • OWNER_ID: ID of your Telegram account, can be obtained by sending /info to @DrFileStreamBot. int
  • ALLOWED_USER_IDS: A list of Telegram account IDs (separated by spaces) that are permitted to use the bot. Leave this field empty to allow anyone to use it. str
  • BOT_USERNAME|TELEGRAM_BOT_USERNAME: Username of your Telegram bot, create one using @BotFather. str
  • BOT_TOKEN|TELEGRAM_BOT_TOKEN: Telegram API token of your bot, can be obtained from @BotFather. str
  • CHANNEL_ID|TELEGRAM_CHANNEL_ID: ID of the channel where bot will forward all files received from users, can be obtained by forwarding any message from channel to @ShowJsonBot and then looking from forward_from_chat key. int
  • BOT_WORKERS: Number of updates bot should process from Telegram at once, by default to 10 updates. int
  • SECRET_CODE_LENGTH: Number of characters that file code should contain, by default to 12 characters. int
  • BASE_URL: Base URL that bot should use while generating file links, can be FQDN and by default to 127.0.0.1. str
  • BIND_ADDRESS: Bind address for web server, by default to 0.0.0.0 to run on all possible addresses. str
  • PORT: Port for web server to run on, by default to 8080. int

๐Ÿ•น Deployment

1.Running locally:

python -m bot

2.Using Docker: (Recommended)

  • Build own Docker image:
docker build -t file-stream-bot .
  • Run the Docker container:
docker run -p 8080:8080 file-stream-bot

โ›‘๏ธ Need help!

  • Ask questions or doubts here.

โค๏ธ Credits & Thanks

Dr.Caduceus: Owner & developer of File Stream Bot.

filestreambot's People

Contributors

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