From b74a4356dd91ec3d3d54da09fdb4328ae4d2041c Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 23 Mar 2019 12:54:22 +0000 Subject: [PATCH] fix lint errors --- src/client/Client.js | 1 - src/client/voice/util/DispatcherSet.js | 42 -------------------------- 2 files changed, 43 deletions(-) delete mode 100644 src/client/voice/util/DispatcherSet.js diff --git a/src/client/Client.js b/src/client/Client.js index 10272aeee..06b8fb489 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -11,7 +11,6 @@ const Webhook = require('../structures/Webhook'); const Invite = require('../structures/Invite'); const ClientApplication = require('../structures/ClientApplication'); const ShardClientUtil = require('../sharding/ShardClientUtil'); -const VoiceBroadcast = require('./voice/VoiceBroadcast'); const UserStore = require('../stores/UserStore'); const ChannelStore = require('../stores/ChannelStore'); const GuildStore = require('../stores/GuildStore'); diff --git a/src/client/voice/util/DispatcherSet.js b/src/client/voice/util/DispatcherSet.js deleted file mode 100644 index 38a7c8b6a..000000000 --- a/src/client/voice/util/DispatcherSet.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -const { Events } = require('../../../util/Constants'); - -/** - * A "store" for handling broadcast dispatcher (un)subscription - * @private - */ -class DispatcherSet extends Set { - constructor(broadcast) { - super(); - /** - * The broadcast that this set belongs to - * @type {VoiceBroadcast} - */ - this.broadcast = broadcast; - } - - add(dispatcher) { - super.add(dispatcher); - /** - * Emitted whenever a stream dispatcher subscribes to the broadcast. - * @event VoiceBroadcast#subscribe - * @param {StreamDispatcher} dispatcher The subscribed dispatcher - */ - this.broadcast.emit(Events.VOICE_BROADCAST_SUBSCRIBE, dispatcher); - return this; - } - - delete(dispatcher) { - const ret = super.delete(dispatcher); - /** - * Emitted whenever a stream dispatcher unsubscribes to the broadcast. - * @event VoiceBroadcast#unsubscribe - * @param {StreamDispatcher} dispatcher The unsubscribed dispatcher - */ - if (ret) this.broadcast.emit(Events.VOICE_BROADCAST_UNSUBSCRIBE, dispatcher); - return ret; - } -} - -module.exports = DispatcherSet;