Skip to content

Commit

Permalink
Undefined guild check in GUILD_UPDATE (fix #266)
Browse files Browse the repository at this point in the history
  • Loading branch information
abalabahaha committed Aug 31, 2017
1 parent 440e8f8 commit 3c8f592
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/gateway/Shard.js
Expand Up @@ -653,6 +653,9 @@ class Shard extends EventEmitter {
}
case "GUILD_UPDATE": {
var guild = this.client.guilds.get(packet.d.id);
if(!guild) {
this.emit("warn", `Guild ${packet.d.id} undefined in GUILD_UPDATE`);
}
var oldGuild = null;
oldGuild = {
name: guild.name,
Expand Down

0 comments on commit 3c8f592

Please sign in to comment.