mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix lint errors
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user