GitHub - api-api-api-api-api/telegraf-file-sharing-2023: File Sharing Bot written in Telegraf.js · GitHub
Skip to content

api-api-api-api-api/telegraf-file-sharing-2023

 
 

Folders and files

Repository files navigation

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

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 protected content, maybe in version 2 i will implement this
  • 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

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

About

File Sharing Bot written in Telegraf.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • TypeScript 100.0%