Skip to content

rainrisa/telegraf-file-sharing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

  • Broadcast messages with stats
  • 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
  • Bot stats (total users)

Notes

Currently it lacks some features like:

  • No customisable, currently you are still required to edit the code directly in order to customize

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_SUB_IDS, optional, all the chat 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
  • BROADCAST_LOG_DELAY, optional, in ms, default to 10000 or 10 seconds

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

Topics

Resources

Stars

Watchers

Forks