From 20d7b3de5905bb0317483436df979f4250c67c1f Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Thu, 4 Jul 2019 10:20:28 -0400 Subject: [PATCH] docs/typings(VoiceStateStore): document and type the class (#3294) * Update index.d.ts * Update Guild.js * Update Guild.js * docs/typings(VoiceStateStore): document and add typings --- src/stores/VoiceStateStore.js | 4 ++++ src/structures/Guild.js | 4 ++++ typings/index.d.ts | 5 +++++ 3 files changed, 13 insertions(+) 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