comp-tg/src/events/message.lua

26 lines
644 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local reg = {
{'эх', 'хуех'}, -- надоели эхать
{'мета', 'хуета'},
{'meta', 'xueta'},
{'цукерберг', 'цукерхуй'},
{'zuckerberg', 'zuckerhui'},
{'whatsapp', 'вадзад'},
{'tiktok', 'деградация'},
{'.*че%?*$', 'пиши ё, грамотей'},
{'.*чё%?*$', 'ничё'}
}
return function(C, api, msg)
if msg.text then
msg.text = utf8.lower(msg.text)
local t = ''
for _, v in pairs(reg) do
if msg.text:match(v[1])
then t = t.. v[2] ..' '
end
end
if t ~= ''
then api:reply(msg, t) end
end
end