Giter Club home page Giter Club logo

force-sub-bot's Introduction

Force Sub Bot

build Go Report Card Go Version

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.

Installation Instructions

Install Go

    git clone https://github.com/udhos/update-golang dlgo && cd dlgo && sudo ./update-golang.sh && source /etc/profile.d/golang_path.sh
  1. Exit and reopen your terminal, then verify the installation with go version.

Set Up the Project

  1. Clone the repository:
    git clone https://github.com/Abishnoi69/Force-Sub-Bot fSub && cd fSub
  2. Prepare the environment file:
    1. Copy the sample environment file: cp sample.env .env
    2. Open env: vi .env
    3. Edit the .env file with your preferred editor. Instructions for editing in vi:
      • Press ษช to start editing.
      • Press Ctrl + C once editing is complete, then type :wq to save and exit, or :qa to exit without saving.
  3. Start a new tmux session: sudo apt install tmux && tmux
  4. Run the bot: go run .

Deploy to Vercel

  1. Fork this repository ๐Ÿด
  2. Login your Vercel account
  3. Go to your Add New Project
  4. Choose the repository you forked
  5. Configure the environment variables: DB_URI Redis
  6. Tap on Deploy

Usage

Once 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.

Commands

  • /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.
  • Owner Only Commands

  • /getChats - Get all chats.
  • /getUsers - Get all users who started in private.
  • /getAllBots - Get all bots running on webhook.

License

Feel free to visit LICENSE for more details.

Contributing Guidelines

Contributions are welcome! For bug reports, feature requests, or pull requests, please open an issue or submit your changes directly.

Support

For any questions or concerns, please contact me at Telegram.

FallenAssociation

force-sub-bot's People

Contributors

ashokshau avatar jisin0 avatar

Stargazers

NyxianNetwork avatar  avatar Move on ->  avatar

Watchers

 avatar

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.