Verarbeite Pre-Processoren nicht mehr, wenn Bot in der Gruppe deaktiviert ist oder Plugin im Chat aus ist

This commit is contained in:
Andreas Bielawski
2016-08-28 18:12:18 +02:00
parent b172aa5b16
commit 1f2f793aac
3 changed files with 31 additions and 24 deletions

View File

@@ -1085,4 +1085,16 @@ function table.contains(table, element)
return false
end
-- Checks if bot was disabled on specific chat
function is_channel_disabled(msg)
local hash = 'chat:'..msg.chat.id..':disabled'
local disabled = redis:get(hash)
if not disabled or disabled == "false" then
return false
end
return disabled
end
return utilities