https://github.com/sattellite/tg-group-control-bot
Telegram bot for exclude bots from group chats
https://github.com/sattellite/tg-group-control-bot
telegram telegram-bot
Last synced: 5 months ago
JSON representation
Telegram bot for exclude bots from group chats
- Host: GitHub
- URL: https://github.com/sattellite/tg-group-control-bot
- Owner: sattellite
- License: mit
- Created: 2020-07-28T08:50:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-13T12:32:03.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T12:54:47.446Z (about 2 years ago)
- Topics: telegram, telegram-bot
- Language: Go
- Homepage:
- Size: 6.9 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Chat control bot for telegram
Bot helps protect your telegram group chat from simple bots. Bot prohibits a new user
from write messages and read history until the user confirms that they are not a
bot.
It sends a message to group chat to confirm that the user is not a bot. The user
will be removed from group chat if they does not confirm that they is not a bot
within 24 hours.
A confirmation message will also be deleted from group chat if it was
successfully confirmed or after user was deleted by inactivity.
## Installation
Get a [bot token](https://core.telegram.org/bots) by chatting with
[BotFather](https://core.telegram.org/bots#6-botfather).
And you need to have MongoDB to store chat and some users data.
### Manual
1. `git clone https://github.com/sattellite/github.com/sattellite/tg-group-control-bot.git`
2. `cd tg-group-control-bot`
3. `go get -v -d ./...`
4. `go build -o group-control-bot cmd/grcbot/main.go`
5. `BOT_TOKEN=xxx MONGO_URL="mongodb://:@:/chat_control" ./group-control-bot`
> If you will copy binary file to other location then you need copy `locales` directory too.
### Docker
1. `git clone https://github.com/sattellite/github.com/sattellite/tg-group-control-bot.git`
2. `cd tg-group-control-bot`
3. Create `.env` file in root of project
4. `docker-compose up -d --build`
#### `.env` file for docker-compose
```
cat > .env <