https://github.com/snowwm/karen
A vk.com bot for total surveillance :telescope:
https://github.com/snowwm/karen
bot vk vk-bot
Last synced: over 1 year ago
JSON representation
A vk.com bot for total surveillance :telescope:
- Host: GitHub
- URL: https://github.com/snowwm/karen
- Owner: snowwm
- License: mit
- Created: 2019-06-23T14:39:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T05:24:21.000Z (over 3 years ago)
- Last Synced: 2024-10-24T06:28:14.818Z (over 1 year ago)
- Topics: bot, vk, vk-bot
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# karen
[](https://pdm.fming.dev)
[](https://github.com/pre-commit/pre-commit)
This VK bot notifies all chat members when someone edits or deletes a message.
The bot also shows message's old text (stored in a database for this purpose).
Minor edits (with [Damerau–Levenshtein distance](https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance) up to 3) and non-textual edits are ignored.
## Usage
You can run this bot on Heroku or any other server.
You will also need a MongoDB database. Provide it in the env variable `AFH_DB_URL` (like `AFH_DB_URL=mongodb://user:pass@example.com/db-name`).
You can get a cloud MongoDB instance for free on https://www.mongodb.com/cloud (there's a web UI and VS Code plugin for editing data).
App configuration is stored as JSON in the database table `singletons`. It looks like:
```json
{
"_id": "config",
"access_token": "VK group API token here",
"logging": {
"version": 1,
"incremental": true,
"loggers": {
"karen": {
"level": "INFO"
}
}
}
}
```
It's also a good idea to create a [TTL index](https://docs.mongodb.com/manual/tutorial/expire-data/) to remove old messages from the DB.
## Todo
- commands
- help
- per-chat settings?
- tone analysis ([example](https://github.com/Ngoroth/Toxicometer))
- warn people if they are being toxic
- ChatOps
- integrate some bot framework, become channel-agnostic