From 0e8a2693fbcba74d5696e1cb28e2d87b2776e13a Mon Sep 17 00:00:00 2001 From: Brayden Date: Mon, 11 Apr 2016 08:02:21 -0700 Subject: [PATCH] Make plugin.cron be called with the instance --- bot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.lua b/bot.lua index 4ce00c2..b82b8b8 100755 --- a/bot.lua +++ b/bot.lua @@ -138,7 +138,7 @@ while instance.is_started do -- Start a loop while the bot should be running. utilities.save_data(instance.info.username..'.db', instance.database) -- Save the database. for i,v in ipairs(instance.plugins) do if v.cron then -- Call each plugin's cron function, if it has one. - local res, err = pcall(function() v.cron() end) + local res, err = pcall(function() v.cron(instance) end) if not res then utilities.handle_exception(instance, err, 'CRON: ' .. i) end