mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Fix channelCreate being emitted twice - fixes #698
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
const AbstractHandler = require('./AbstractHandler');
|
||||
|
||||
const Constants = require('../../../../util/Constants');
|
||||
|
||||
class ChannelCreateHandler extends AbstractHandler {
|
||||
handle(packet) {
|
||||
const client = this.packetManager.client;
|
||||
const data = packet.d;
|
||||
const response = client.actions.ChannelCreate.handle(data);
|
||||
if (response.channel) client.emit(Constants.Events.CHANNEL_CREATE, response.channel);
|
||||
client.actions.ChannelCreate.handle(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user