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) => (api, msg) =>
if msg.text if msg.text
msg.text = utf8.lower ' '.. msg.text ..' ' msg.text = utf8.lower ' '.. msg.text ..' '
@ -25,6 +33,10 @@ reg = {
api\reply msg, t if t ~= msg.text api\reply msg, t if t ~= msg.text
elseif msg.sticker elseif msg.sticker
if msg.sticker.file_unique_id == 'AgADwAADcpO1DQ' for k, v in pairs stick
api\reply msg, 'редебало' 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 return