Fix bot not being passed into onReady by wrapper
This commit is contained in:
parent
d7a5716c35
commit
e0ecf01941
4
index.js
4
index.js
|
@ -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 = () => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue