update lib, add some random

This commit is contained in:
Er2 2022-02-28 10:17:49 +03:00
parent daa848cecd
commit 0b2a7ac8e5
2 changed files with 15 additions and 3 deletions

@ -1 +1 @@
Subproject commit fefafd4923e824cb5a7f762c7e65d24cdc1f8d87
Subproject commit da0a266b72f0919c5ed1bfa3fbc75e7d2f398229

View file

@ -16,6 +16,14 @@ reg = {
{'чё%?*', 'ничё'}
}
stick = {
{
'AgADwAADcpO1DQ'
'редебало'
'CAACAgIAAx0CUY2umQACFItiHHUg6w_MPu6Vs8k76cwn4OIHNQACwAADcpO1DVbNTDlmHOWMIwQ'
}
}
(api, msg) =>
if msg.text
msg.text = utf8.lower ' '.. msg.text ..' '
@ -25,6 +33,10 @@ reg = {
api\reply msg, t if t ~= msg.text
elseif msg.sticker
if msg.sticker.file_unique_id == 'AgADwAADcpO1DQ'
api\reply msg, 'редебало'
for k, v in pairs stick
if msg.sticker.file_unique_id == v[1]
if math.random! <= 0.5
api\reply msg, v[2]
else api\sendSticker msg, v[3] --, _, _, _, msg.message_id
return