Change for Akairo V8

This commit is contained in:
Supositware 2019-01-02 21:46:12 +01:00
parent 6218675e50
commit 40396fda66
5 changed files with 11 additions and 11 deletions

View file

@ -4,7 +4,7 @@ class CommandBlockedListener extends Listener {
constructor() { constructor() {
super('commandBlocked', { super('commandBlocked', {
emitter: 'commandHandler', emitter: 'commandHandler',
eventName: 'commandBlocked' event: 'commandBlocked'
}); });
} }

View file

@ -7,7 +7,7 @@ class guildCreateListener extends Listener {
constructor() { constructor() {
super('guildCreate', { super('guildCreate', {
emitter: 'client', emitter: 'client',
eventName: 'guildCreate' event: 'guildCreate'
}); });
} }

View file

@ -7,7 +7,7 @@ class guildCreateListener extends Listener {
constructor() { constructor() {
super('guildDelete', { super('guildDelete', {
emitter: 'client', emitter: 'client',
eventName: 'guildDelete' event: 'guildDelete'
}); });
} }

View file

@ -4,11 +4,11 @@ const reactObject = require('../json/react.json');
const imgResponseObject = require('../json/imgreply.json'); const imgResponseObject = require('../json/imgreply.json');
const reload = require('auto-reload'); const reload = require('auto-reload');
class MessageListener extends Listener { class messageListener extends Listener {
constructor() { constructor() {
super('message', { super('message', {
emitter: 'client', emitter: 'client',
eventName: 'message' event: 'message'
}); });
} }
@ -16,14 +16,14 @@ class MessageListener extends Listener {
let autoresponse = reload('../json/autoresponse.json'); let autoresponse = reload('../json/autoresponse.json');
let message_content = message.content.toLowerCase(); let message_content = message.content.toLowerCase();
let customresponse = reload(`../tag/${message.guild.id}.json`); let customresponse = reload(`../tag/${message.guild.id}.json`);
if (message.author.bot) return; { if (message.author.bot) return; {
// User autoresponse // User autoresponse
if(customresponse[message_content]) { if(customresponse[message_content]) {
message.channel.send(customresponse[message_content]); message.channel.send(customresponse[message_content]);
} }
// If autoresponse is enable send the response // If autoresponse is enable send the response
if(autoresponse[message.channel.id] == 'enable') { if(autoresponse[message.channel.id] == 'enable') {
// Reply with images as attachement // Reply with images as attachement
@ -44,9 +44,9 @@ class MessageListener extends Listener {
} else if (message_content.includes('jeff')) { } else if (message_content.includes('jeff')) {
message.react('496028845967802378'); message.react('496028845967802378');
} }
} }
} }
} }
} }
module.exports = MessageListener; module.exports = messageListener;

View file

@ -6,7 +6,7 @@ class MessageReactionAddListener extends Listener {
constructor() { constructor() {
super('messagereactionadd', { super('messagereactionadd', {
emitter: 'client', emitter: 'client',
eventName: 'messageReactionAdd' event: 'messageReactionAdd'
}); });
} }