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 sub channels and groups as you want
- Custom force sub urls without requiring the bot to join the specified channels/groups
- 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
- No auto-delete shared messages
Usage
Variables
TELEGRAM_BOT_TOKEN, required, your bot token from BotFatherDB_CHANNEL_ID, required, a channel where all your files/messages will be storedFORCE_SUB_IDS, optional, all the chat ids you want people to joinFORCE_SUB_URLS, optional, custom chat links that don't require the bot to join the groupADMIN_IDS, required, fill least one adminDATABASE_URL, optional, fill this with your MongoDB uri if you want to use a database, if not, all data will stored in RAMDEVELOPMENT, optional, settrueif you are on local so you don't have to setup a web server. Also set thistrueif you want to use long polling instead of webhookNO_FORWARD, optional, settrueif you want to disable forwardingBROADCAST_LOG_DELAY, optional, in ms, default to10000or 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