Fixed bug, where the bot wouldn't really react.
This commit is contained in:
parent
ae5ed523d0
commit
529bec4270
3
main.lua
3
main.lua
|
@ -522,13 +522,13 @@ local function handle_message(bot, user, channel, message, is_slow_channel)
|
|||
-- Memes are restricted, a bit.
|
||||
if is_slow_channel then
|
||||
if not (FORRIGE_MEME + MEME_INTERVAL < os.time()) then return 'NOMEME' end
|
||||
FORRIGE_MEME = os.time()
|
||||
end
|
||||
|
||||
-- Bait msg
|
||||
if message:match '%f[%a]bait%f[%A]' then
|
||||
human_delay()
|
||||
bot:sendChat(channel, generate_bait_link())
|
||||
FORRIGE_MEME = os.time()
|
||||
return 'BAIT'
|
||||
end
|
||||
|
||||
|
@ -552,6 +552,7 @@ local function handle_message(bot, user, channel, message, is_slow_channel)
|
|||
else
|
||||
bot:sendChat(channel, 'Sorry, no can do. '..tostring(error_message)..'.')
|
||||
end
|
||||
FORRIGE_MEME = os.time()
|
||||
return 'BRAIN'
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user