diff --git a/listeners/guildCreate.js b/listeners/guildCreate.js index 7233419..9b53082 100644 --- a/listeners/guildCreate.js +++ b/listeners/guildCreate.js @@ -12,7 +12,7 @@ class guildCreateListener extends Listener { async exec(guild, client) { console.log(`${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}`); - const channel = client.channels.get(statsChannel); + const channel = this.client.channels.get(statsChannel); const addEmbed = new Discord.RichEmbed() .setColor("#52e80d") .setTitle('Someone added me ! YAY :D') diff --git a/listeners/guildDelete.js b/listeners/guildDelete.js index 774df0f..d9be775 100644 --- a/listeners/guildDelete.js +++ b/listeners/guildDelete.js @@ -12,7 +12,7 @@ class guildCreateListener extends Listener { async exec(guild, client) { console.log(`***BOT KICKED***\n${guild.name}\n${guild.memberCount} users\nOwner: ${guild.owner.user.username}\nOwner ID: ${guild.owner}\n***BOT KICKED***`); - const channel = client.channels.get(statsChannel); + const channel = this.client.channels.get(statsChannel); const kickEmbed = new Discord.RichEmbed() .setColor("#FF0000")