This project includes a Telegram bot designed to enforce subscription to a specific channel before allowing users to interact in a group chat. It's built using Go and integrates with the Telegram Bot API using gotgbot.
go version
.git clone https://github.com/Abishnoi69/Force-Sub-Bot fSub && cd fSub
cp sample.env .env
vi .env
.env
file with your preferred editor. Instructions for editing in vi
:
ɪ
to start editing.Ctrl + C
once editing is complete, then type :wq
to save and exit, or :qa
to exit without saving.tmux
session: sudo apt install tmux && tmux
go run .
DB_URI
RedisOnce the bot is running, it will enforce subscription to a specific channel before allowing users to interact in the group chat. Users not subscribed to the channel will be prompted to do so.
/start
- Start the bot./fsub
- Set the channel for force subscription. Reply to a forwarded message from the channel you wish to set./fsub on
- Enable force subscription mode./fsub off
- Disable force subscription mode./fsub
- Get the current force subscription status./getChats
- Get all chats./getUsers
- Get all users who started in private./getAllBots
- Get all bots running on webhook.Feel free to visit LICENSE for more details.
Contributions are welcome! For bug reports, feature requests, or pull requests, please open an issue or submit your changes directly.
For any questions or concerns, please contact me at Telegram.