Skip to content

Commit

Permalink
fix(GuildBanAddHandler): not emitting guildBanAdd for uncached users (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu authored and SpaceEEC committed Aug 18, 2018
1 parent 5fdd3a5 commit e935611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/websocket/packets/handlers/GuildBanAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class GuildBanAddHandler extends AbstractHandler {
const client = this.packetManager.client;
const data = packet.d;
const guild = client.guilds.get(data.guild_id);
const user = client.users.get(data.user.id);
const user = client.users.add(data.user);
if (guild && user) client.emit(Events.GUILD_BAN_ADD, guild, user);
}
}
Expand Down

0 comments on commit e935611

Please sign in to comment.