Fix bot not being passed into onReady by wrapper

This commit is contained in:
benji7425 2017-04-22 22:46:23 +01:00
parent d7a5716c35
commit e0ecf01941
2 changed files with 3 additions and 3 deletions

View File

@ -10,8 +10,8 @@ var Console = require("console");
var Config = require("./config.json"); //config file containing other settings
module.exports = {
onReady: () => {
Actions.checkPastMessagesForLinks(); //we need to check past messages for links on startup, but also on reconnect because we don't know what has happened during the downtime
onReady: (bot) => {
Actions.checkPastMessagesForLinks(bot); //we need to check past messages for links on startup, but also on reconnect because we don't know what has happened during the downtime
//set the interval function to check the feed
intervalFunc = () => {

View File

@ -14,7 +14,7 @@ var EventHandlers = {
for (let i = 0, len = BotModules.length; i < len; i++) {
let botModule = BotModules[i];
if (botModule.onReady) botModule.onReady();
if (botModule.onReady) botModule.onReady(bot);
}
},
onDisconnect: (err, code) => {