config examples

This commit is contained in:
Von Random 2023-10-31 02:14:26 +02:00
parent 57f6d668c5
commit a0568d1ecb
4 changed files with 83 additions and 0 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@
__pycache__ __pycache__
*/*.pyc */*.pyc
*/__pycache__ */__pycache__
config.yml
conf.d

21
config.dist.yml Normal file
View file

@ -0,0 +1,21 @@
# gibberish here, read telethon docs for further details
api_id: 00000000
api_hash: 000000000000000000000000000000ff
bot_token: 0000000000:ABCDEFGHijklmnoPQRSTUVWXYZ-v1234567
# refer psycopg.connect() docs for db_spec, also this:
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
db_spec: |
dbname=pgbot
user=pgbot
host=127.0.0.1
port=5432
password=somepass
# list of regex tokens and regex
response_tokens: tokens.dist.yml
# scheduled task list
schedule: sched.dist.yml
admins:
- 00000000

15
sched.dist.yml Normal file
View file

@ -0,0 +1,15 @@
# schedule things here, see examples
- tokens: botname,praise
chat: 00000000
days: [1, 5]
time:
- "19:59"
rand: 5
- tokens: greeting
chat: 00000000
days: [1, 2, 3]
time:
- "13:05"
- "13:10"
rand: 3

45
tokens.dist.yml Normal file
View file

@ -0,0 +1,45 @@
# you don't have to add regex for commands as they are matched separately
start_cmd: []
stop_cmd: []
# tokens starting with ! are prioratized
# if one of those is matched, it does not matter if there is a longer match
# e.g. "botname,obscenity,praise,!find" will trigger "botname,!find", despite
# "botname,obscenity,praise" being longer
ass:
- жоп
drugs:
- нарк
botname:
- бот(яра)?
- железяка
praise:
- хорош
- няшка
- молодец
- крут
- милый
- ум(ный|[её]н)
- жж[ео]шь?
- (пре)?крас(ав)?
whatsup:
- как\s+(дела|жизнь|оно|ты|сам)
- нормальн
- вс[её]\s+ок\?
- ты\s+как\?
greeting:
- привет
- здарова
- здравствуй
- хай
- эгегей
thx:
- спасиб
- благодарю
- мерси
speak:
- говорить
- общаться
"!find":
- \bнайди\b
- \bищи\b