removed echo and die statements, lolz.
This commit is contained in:
parent
88cc3f5e6b
commit
340ca1f556
@ -86,7 +86,7 @@ function bot:on_msg_receive(msg, config) -- The fn run whenever a message is rec
|
|||||||
end
|
end
|
||||||
|
|
||||||
function bot:on_callback_receive(callback, msg, config) -- whenever a new callback is received
|
function bot:on_callback_receive(callback, msg, config) -- whenever a new callback is received
|
||||||
-- remove comment to enable debugging
|
-- remove comments to enable debugging
|
||||||
-- vardump(msg)
|
-- vardump(msg)
|
||||||
-- vardump(callback)
|
-- vardump(callback)
|
||||||
|
|
||||||
@ -104,21 +104,12 @@ function bot:on_callback_receive(callback, msg, config) -- whenever a new callba
|
|||||||
print('Callback Query "'..param..'" für Plugin "'..called_plugin..'" ausgelöst von '..callback.from.first_name..' ('..callback.from.id..')')
|
print('Callback Query "'..param..'" für Plugin "'..called_plugin..'" ausgelöst von '..callback.from.first_name..' ('..callback.from.id..')')
|
||||||
|
|
||||||
msg = utilities.enrich_message(msg)
|
msg = utilities.enrich_message(msg)
|
||||||
-- called_plugin:callback(callback, msg, self, config, param)
|
for _, plugin in ipairs(self.plugins) do
|
||||||
-- if is_plugin_disabled_on_chat(plugin.name, msg) then return end
|
if plugin.name == called_plugin then
|
||||||
for _, plugin in ipairs(self.plugins) do
|
if is_plugin_disabled_on_chat(plugin.name, msg) then return end
|
||||||
if plugin.name == called_plugin then
|
plugin:callback(callback, msg, self, config, param)
|
||||||
if is_plugin_disabled_on_chat(plugin.name, msg) then return end
|
|
||||||
plugin:callback(callback, msg, self, config, param)
|
|
||||||
end
|
|
||||||
--plugin.callback(callback, msg, self, config, para)
|
|
||||||
end
|
end
|
||||||
-- called_plugin:callback(callback, msg, self, config, param)
|
end
|
||||||
--[[ for _,plugin in ipairs(self.plugins) do
|
|
||||||
if plugin.callback and msg then
|
|
||||||
plugin:callback(callback, msg, self, config)
|
|
||||||
end
|
|
||||||
end]]--
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function bot:run(config)
|
function bot:run(config)
|
||||||
|
Reference in New Issue
Block a user