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
|
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 = () => {
|
||||||
|
|
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in a new issue