diff --git a/otouto/bot.lua b/otouto/bot.lua index d781f10..3180048 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -5,7 +5,7 @@ local bindings -- Load Telegram bindings. local utilities -- Load miscellaneous and cross-plugin functions. local redis = (loadfile "./otouto/redis.lua")() -bot.version = '2.2.3.1' +bot.version = '2.2.3.2' function bot:init(config) -- The function run when the bot is started or reloaded. diff --git a/otouto/plugins/afk.lua b/otouto/plugins/afk.lua index 40ac9be..a0c5c63 100644 --- a/otouto/plugins/afk.lua +++ b/otouto/plugins/afk.lua @@ -80,8 +80,7 @@ function afk:pre_process(msg, self) local timestamp = redis:hget(hash, 'time') local current_timestamp = msg.date local afk_time = current_timestamp - timestamp - local seconds = afk_time % 60 - local duration = makeHumanTime(seconds) + local duration = makeHumanTime(afk_time) redis:hset(hash, 'afk', false) if afk_text then