Giter Club home page Giter Club logo

telegraf-file-sharing's Introduction

Telegraf File Sharing

Hi, this is just my personal bot to improve my programming skills

This repository is based on File Sharing Bot which created using Pyrogram. But in my repository I choose Telegraf.js. I think it's just easier to find the hosting site if we use a https bot, because we can use webhook

Features

  • Share any kind of messages
  • You are free to set as many force channels and groups as you want
  • Support db (MongoDB) and no db (in memory), just in case you want to quickly share some files without the need of database
  • Multiple admins
  • Have short urls, for example: https://t.me/your_bot?start=2781253471
  • Enable/disable forwarding

Notes

Currently it lacks some features like:

  • Broadcast, I haven't tried to broadcast yet so I still have to find out what type of errors might be triggered. Because unlike Pyrogram, Telegraf doesn't have any custom error types
  • Redis, i don't know, maybe some people just prefer using this one instead of MongoDB
  • No customisable, currently you are still required to edit the code directly in order to customize
  • No bot stats, but you can still look directly all the users that has started your bot on your database, if you use one

Usage

  • Just import this repository on Replit or cyclic and fill out the variables

Variables

  • TELEGRAM_BOT_TOKEN, required, your bot token from BotFather
  • DB_CHANNEL_ID, required, a channel where all your files/messages will be stored
  • FORCE_CHANNEL_IDS, optional, all channel ids you want people to join
  • FORCE_GROUP_IDS, optional, all group ids you want people to join
  • ADMIN_IDS, required, fill least one admin
  • DATABASE_URL, optional, fill this with your MongoDB uri if you want to use a database, if not, all data will stored in RAM
  • DEVELOPMENT, optional, set true if you are on local so you don't have to setup a web server. Also set this true if you want to use long polling instead of webhook
  • NO_FORWARD, optional, set true if you want to disable forwarding

You don't need to set API_ID and API_HASH because this is not an MTProto bot. You probably want to read this as a reference

Support

If you have any errors, you can create a new issue in this repository. I will look into it and see if we can find the solution

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.