add хуех on эх, start command

This commit is contained in:
Er2 2022-02-25 10:31:32 +03:00
parent 7e26dfa38d
commit b0f616fd32
5 changed files with 18 additions and 2 deletions

View file

@ -12,6 +12,7 @@ return {
'command',
'ready',
'inlineQuery',
'message',
},
parts = {
'locale',

View file

@ -1,6 +1,6 @@
return {
hide = true,
run = function(C, msg)
C.api:reply(msg, 'TODO!')
C.api:reply(msg, msg.loc.msg)
end
}

9
src/events/message.lua Normal file
View file

@ -0,0 +1,9 @@
return function(C, api, msg)
-- надоели эхать
if msg.text
and msg.text:match '[Ээ]+[Хх]+' then
C.api:reply(msg, msg.text
:gsub('[Ээ]+[Хх]+', 'хуех')
,nil)
end
end

View file

@ -26,6 +26,9 @@
"cur": "Currency at %s:\n%s",
"notf": "\nNot found: ",
"prov": "\nData provided from central bank of Russia."
},
"start": {
"msg": "Hi! I'm Computer - an open-source bot.\nIf you looking for source code: https://gitdab.com/er2/comp-tg"
}
}
}

View file

@ -26,6 +26,9 @@
"cur": "Курс на %s:\n%s",
"notf": "\nНе нашлось: ",
"prov": "\nДанные предоставлены центральным банком России."
},
"start": {
"msg": "Привет! Я Computer - бот с открытым исходным кодом.\nЕсли ты ищешь исходники: https://gitdab.com/er2/comp-tg"
}
}
}