mirror of
https://github.com/danbulant/discord.js
synced 2026-07-12 22:50:40 +00:00
fix lint errors
This commit is contained in:
parent
6adb0a6609
commit
b74a4356dd
2 changed files with 0 additions and 43 deletions
|
|
@ -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;
|
||||
Loading…
Reference in a new issue