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 var Config = require("./config.json"); //config file containing other settings
module.exports = { module.exports = {
onReady: () => { onReady: (bot) => {
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 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 //set the interval function to check the feed
intervalFunc = () => { intervalFunc = () => {

View file

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