diff --git a/otouto/bot.lua b/otouto/bot.lua index 5a3febc..4bdb26f 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -229,7 +229,6 @@ function bot:run(config) -- Run cron jobs every minute. if self.last_cron ~= os.date('%M') then self.last_cron = os.date('%M') - utilities.save_data(self.info.username..'.db', self.database) -- Save the database. for n=1, #self.plugins do local v = self.plugins[n] if v.cron then -- Call each plugin's cron function, if it has one. diff --git a/otouto/plugins/media.lua b/otouto/plugins/media.lua index 5244a0b..44423ee 100644 --- a/otouto/plugins/media.lua +++ b/otouto/plugins/media.lua @@ -1,5 +1,7 @@ local media = {} +local mime = (loadfile "./otouto/mimetype.lua")() + media.triggers = { "(https?://[%w-_%.%?%.:,/%+=&%[%]]+%.(gif))$", "^(https?://[%w-_%.%?%.:,/%+=&%[%]]+%.(mp4))$", diff --git a/otouto/utilities.lua b/otouto/utilities.lua index 2bc3b88..ef18b6a 100644 --- a/otouto/utilities.lua +++ b/otouto/utilities.lua @@ -30,7 +30,6 @@ json = require("dkjson") pcall(json.use_lpeg) serpent = require("serpent") redis = (loadfile "./otouto/redis.lua")() -mime = (loadfile "./otouto/mimetype.lua")() OAuth = require "OAuth" helpers = require "OAuth.helpers"