Giter VIP home page Giter VIP logo

banbyid's Introduction

BanByID

This is a Telegram bot developed in JavaScript with the Telegraf library, which allows to automatically ban users from a group if they have a specific ID. The bot stores a list of IDs in a .json file and checks if a user who enters the group has any of these IDs. If so, the user is automatically banned.

How to use

  1. Clone this repository to your computer.
  2. Install the necessary dependencies using the command npm install.
  3. Copy the .env.copy file to a .env in the project root and add the BOT_TOKEN key with your Telegram bot token.
  4. Create a spam-users-id.json file in the project root and add the IDs of the users you want to ban. For example:
[5753128895, 1548692361, 5800820904]
  1. Run the bot using the command npm start.

Available commands

  • /add [id] - Adds an ID to the list of banned users.
  • /deleteid [id] - Removes an ID from the list of banned users.
  • /count [id] - Returns with the number of users in the list
  • /list - Shows the list of banned IDs.

Notes

Make sure your bot has permission to ban users in groups. The bot only checks the IDs of users who enter the group after it is started. If a user is already in the group when the bot is started, the bot will not automatically ban the user.

banbyid's People

Contributors

camilotk avatar suburbanno avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

camilotk sam-llt

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.