Kantek is a userbot written in Python using Telethon.
Kantek is mostly built to help with the Administration of chats and is the main source for SpamWat.ch. Because of that it checks every message your account receives for blacklisted items, this includes strings, domains, top level domains, files, images and telegram entities. This means that for every message your account receives Kantek might make multiple http requests an resolve multiple telegram entities. The latter might lead to large (6+ hours) Floodwaits from Telegram.
If you want to use Kantek without the administration part, simply remove the plugins/autobahn
folder to disable these features.
Python 3.8+ is required to run the bot. ArangoDB 3.5+ is used to store bot data.
- Copy the example config file to
config.json
- Create a user and a Database in ArangoDB. Give the user full permissions to the Database. The config defaults to the user and database name to
kantek
can be changed with db_username and db_name respectively. - Put the Authentication data into the config file.
- Run bot.py
Get it from http://my.telegram.org/
Required | Type | Default |
---|---|---|
Yes | int | - |
Get it from http://my.telegram.org/
Required | Type | Default |
---|---|---|
Yes | str | - |
Required | Type | Default |
---|---|---|
No | str | kantek |
Required | Type | Default |
---|---|---|
No | str | kantek |
Required | Type | Default |
---|---|---|
Yes | str | - |
Required | Type | Default |
---|---|---|
No | str | http://127.0.0.1:8529 |
Set this if you use your Database in a cluster
If using ArangoDB this will mean you blacklist indices will be very large
Required | Type | Default |
---|---|---|
No | bool | false |
Required | Type | Default |
---|---|---|
Yes | str | - |
Required | Type | Default |
---|---|---|
Yes | int | - |
Required | Type | Default |
---|---|---|
No | int | - |
Provide single prefix or a list of prefixes These will be escaped automatically
Required | Type | Default |
---|---|---|
No | str | list |
Required | Type | Default |
---|---|---|
No | str | kantek-session |
Required | Type | Default |
---|---|---|
No | str | https://api.spamwat.ch |
Required | Type | Default |
---|---|---|
No | str | - |
Useful for local development. Disabled actually banning a user in groups and reporting messages when using gban.
Required | Type | Default |
---|---|---|
No | bool | False |
Used in .kantek and .update
Required | Type | Default |
---|---|---|
No | str | src.kv2.dev |