client.on('chat', function(channel, user, message, self){
console.log(channel);
console.log(user);
console.log(message);
console.log(botCommands.length);
for(i=0;i<load.botCommands.length;i++) {
if(message.toLowerCase() === "!"+load.botCommands[i].command){
if(load.botCommands[i].mod) {
if(!(user["user-type"] != "mod" && user.username != channel.replace("#", ""))) {
break;
}
}
if(load.botCommands[i].me) {
if(user['display-name'] != "TheDerpySupport"){
break;
}
}
if(load.botCommands[i].whisper) {
client.whisper(user['display-name'], load.botCommands[i].description);
} else {
client.say(channel, load.botCommands[i].description);
}
}
}
});
module.exports.botCommands = botCommands;