Browse Source

Fix bot not being passed into onReady by wrapper

shorten
benji7425 4 years ago
parent
commit
e0ecf01941
  1. 4
      index.js
  2. 2
      wrapper/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 = () => {

2
wrapper/index.js

@ -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…
Cancel
Save