From e95d4ad5e225e0e01a4625d3532c52c888a8bef9 Mon Sep 17 00:00:00 2001 From: Lamp Date: Mon, 8 Oct 2018 21:35:50 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/local_events.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/local_events.js b/src/local_events.js index 28838e9..7b0c486 100644 --- a/src/local_events.js +++ b/src/local_events.js @@ -1,24 +1,24 @@ -dClient.on("guildMemberAdd", function(member){ +dClient.on("guildMemberAdd", async function(member){ if (member.guild.id == config.guildID) this.emit("local_guildMemberAdd", member); }); -dClient.on("guildMemberRemove", function(member){ +dClient.on("guildMemberRemove", async function(member){ if (member.guild.id == config.guildID) this.emit("local_guildMemberRemove", member); }); -dClient.on("guildMemberUpdate", function(oldMember, newMember){ +dClient.on("guildMemberUpdate", async function(oldMember, newMember){ if (newMember.guild.id == config.guildID) this.emit("local_guildMemberUpdate", oldMember, newMember); }); -dClient.on("message", function(message){ - if (message.guild.id == config.guildID) +dClient.on("message", async function(message){ + if (message.guild && message.guild.id == config.guildID) this.emit("local_message", message); }); -dClient.on("presenceUpdate", function(oldPresence, newPresence){ +dClient.on("presenceUpdate", async function(oldPresence, newPresence){ if (newPresence.member && newPresence.member.guild.id == config.guildID) this.emit("local_presenceUpdate", oldPresence, newPresence); }); -dClient.on("voiceStateUpdate", function(oldState, newState){ +dClient.on("voiceStateUpdate", async function(oldState, newState){ if (newState.guild.id == config.guildID) this.emit("local_voiceStateUpdate", oldState, newState); -}); \ No newline at end of file +});