mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
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
This commit is contained in:
@@ -3,6 +3,10 @@
|
|||||||
const DataStore = require('./DataStore');
|
const DataStore = require('./DataStore');
|
||||||
const VoiceState = require('../structures/VoiceState');
|
const VoiceState = require('../structures/VoiceState');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stores voice states.
|
||||||
|
* @extends {DataStore}
|
||||||
|
*/
|
||||||
class VoiceStateStore extends DataStore {
|
class VoiceStateStore extends DataStore {
|
||||||
constructor(guild, iterable) {
|
constructor(guild, iterable) {
|
||||||
super(guild.client, iterable, VoiceState);
|
super(guild.client, iterable, VoiceState);
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ class Guild extends Base {
|
|||||||
*/
|
*/
|
||||||
this.presences = new PresenceStore(this.client);
|
this.presences = new PresenceStore(this.client);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A collection of voice states in this guild
|
||||||
|
* @type {VoiceStateStore<Snowflake, VoiceState>}
|
||||||
|
*/
|
||||||
this.voiceStates = new VoiceStateStore(this);
|
this.voiceStates = new VoiceStateStore(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
5
typings/index.d.ts
vendored
5
typings/index.d.ts
vendored
@@ -469,6 +469,7 @@ declare module 'discord.js' {
|
|||||||
public verificationLevel: number;
|
public verificationLevel: number;
|
||||||
public readonly verified: boolean;
|
public readonly verified: boolean;
|
||||||
public readonly voice: VoiceState | null;
|
public readonly voice: VoiceState | null;
|
||||||
|
public readonly voiceStates: VoiceStateStore;
|
||||||
public readonly widgetChannel: TextChannel | null;
|
public readonly widgetChannel: TextChannel | null;
|
||||||
public widgetChannelID: Snowflake | null;
|
public widgetChannelID: Snowflake | null;
|
||||||
public widgetEnabled: boolean | null;
|
public widgetEnabled: boolean | null;
|
||||||
@@ -1542,6 +1543,10 @@ declare module 'discord.js' {
|
|||||||
public fetch(id: Snowflake, cache?: boolean): Promise<User>;
|
public fetch(id: Snowflake, cache?: boolean): Promise<User>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class VoiceStateStore extends DataStore<Snowflake, VoiceState, typeof VoiceState> {
|
||||||
|
constructor(guild: Guild, iterable?: Iterable<any>);
|
||||||
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Mixins
|
//#region Mixins
|
||||||
|
|||||||
Reference in New Issue
Block a user