diff --git a/src/stores/VoiceStateStore.js b/src/stores/VoiceStateStore.js index ece3c2bb6..a5eaac2dc 100644 --- a/src/stores/VoiceStateStore.js +++ b/src/stores/VoiceStateStore.js @@ -3,6 +3,10 @@ const DataStore = require('./DataStore'); const VoiceState = require('../structures/VoiceState'); +/** + * Stores voice states. + * @extends {DataStore} + */ class VoiceStateStore extends DataStore { constructor(guild, iterable) { super(guild.client, iterable, VoiceState); diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 820fac513..30f3175f9 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -57,6 +57,10 @@ class Guild extends Base { */ this.presences = new PresenceStore(this.client); + /** + * A collection of voice states in this guild + * @type {VoiceStateStore} + */ this.voiceStates = new VoiceStateStore(this); /** diff --git a/typings/index.d.ts b/typings/index.d.ts index de3255919..df4831d00 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -469,6 +469,7 @@ declare module 'discord.js' { public verificationLevel: number; public readonly verified: boolean; public readonly voice: VoiceState | null; + public readonly voiceStates: VoiceStateStore; public readonly widgetChannel: TextChannel | null; public widgetChannelID: Snowflake | null; public widgetEnabled: boolean | null; @@ -1542,6 +1543,10 @@ declare module 'discord.js' { public fetch(id: Snowflake, cache?: boolean): Promise; } + export class VoiceStateStore extends DataStore { + constructor(guild: Guild, iterable?: Iterable); + } + //#endregion //#region Mixins