Added channel.delete()

This commit is contained in:
hydrabolt
2016-04-27 16:25:57 +01:00
parent b436fac5c4
commit 2341c83638
7 changed files with 51 additions and 8 deletions

View File

@@ -19,10 +19,10 @@ class ChannelDeleteHandler extends AbstractHandler {
let data = packet.d;
let client = this.packetManager.client;
let channel = client.store.get('channels', data.id);
let response = client.actions.ChannelCreate.handle(data);
if (channel) {
client.store.KillChannel(channel);
if (response.channel) {
client.emit(Constants.Events.CHANNEL_DELETE, response.channel);
}
}