Open source Telegram bot that helps to moderate chats.
The bot can run votes to ban a user in a chat. The user will be banned and their message deleted if the appropriate number of votes is reached. This feature will help users ban the violator when administrators are offline. Messages sent more than 48 hours ago won't be deleted according to Telegram rules.
/voteban
- start voting (can be used without the slash)
Tip: Don't set your vote limit too low. Otherwise, a user who has several accounts will be able to single-handedly collect the required number of votes and ban other chat members.
The bot can communicate in different languages so that chat users can understand the bot.
The bot can filter messages on behalf of channels (not to be confused with forwarded messages) in group chats. Users who have their own Telegram channels can write in public chats on behalf of the channels. In this way, they can make advertising for themselves or simply anonymize messages without fear of ban. Even if the administrator bans a chat channel, the user can create a new channel and write on its behalf.
The bot can filter profanity in chat, including usernames. The filter won't be applied to messages from administrators.
The bot can prevent users from adding bots to chat. This will help avoid spam or, for example, collecting chat statistics without the approval of administrators. Additionally, the ban of the violator can be configured. The user who tried to add the bot will be banned.
The bot can work in different time zones and display dates in the appropriate format.
The bot can issue warnings to users by admin command. To do this, respond to the user's message with the appropriate command. In this case, the user's message will be deleted. Each warning is valid for 90 days, then it is automatically removed. If 3 warnings are received, the user will be banned.
/warn
- issue a warning
- Docker
- NPM (check the actual version in the
engines
section of the package.json file) - Node.js (check the actual version in the
engines
section of the package.json file)
-
Provide environment variables. Copy .env.sample to
.env
and set correct values. -
Install dependencies
npm ci
-
Build sources
npm run build
-
Run production server
npm run start:prod
To start the server in docker, use the following command:
npm run start:prod:docker
-
Provide environment variables. Copy .env.sample to
.env
and set correct values. -
Install dependencies
npm ci
-
Run development server
npm run start:dev
Get more details in Contributing
Statements | Branches | Functions | Lines |
---|---|---|---|
This project is licensed under the terms of the MIT license.