fixed untracked files

This commit is contained in:
Luca Schwan
2020-03-21 03:48:59 +01:00
parent 7462ec7ce2
commit 5a63d36fa4
1066 changed files with 0 additions and 138320 deletions

View File

@ -1,36 +0,0 @@
'use strict';
const BaseManager = require('./BaseManager');
const VoiceState = require('../structures/VoiceState');
/**
* Manages API methods for VoiceStates and stores their cache.
* @extends {BaseManager}
*/
class VoiceStateManager extends BaseManager {
constructor(guild, iterable) {
super(guild.client, iterable, VoiceState);
/**
* The guild this manager belongs to
* @type {Guild}
*/
this.guild = guild;
}
/**
* The cache of this manager
* @type {Collection<Snowflake, VoiceState>}
* @name VoiceStateManager#cache
*/
add(data, cache = true) {
const existing = this.cache.get(data.user_id);
if (existing) return existing._patch(data);
const entry = new VoiceState(this.guild, data);
if (cache) this.cache.set(data.user_id, entry);
return entry;
}
}
module.exports = VoiceStateManager;