Skip to content

snowwm/karen

Repository files navigation

karen

pdm-managed 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 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:[email protected]/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:

{
  "_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 to remove old messages from the DB.

Todo

  • commands
    • help
    • per-chat settings?
  • tone analysis (example)
    • warn people if they are being toxic
  • ChatOps
  • integrate some bot framework, become channel-agnostic

About

A vk.com bot for total surveillance 🔭

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages