mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 13:03:31 +01:00
feat(VoiceState): add methods for fetching voice state (#10442)
* feat(VoiceState): add methods for fetching voice state * fix: links to new methods * chore: remove unused import * chore: use member id * chore: requested changes * chore: '@me' as fetch param * chore: add ediUserVoiceState return type * refactor: redirect function calls to VoiceAPI --------- Co-authored-by: Almeida <almeidx@pm.me> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -3625,6 +3625,7 @@ export class VoiceState extends Base {
|
||||
public setRequestToSpeak(request?: boolean): Promise<this>;
|
||||
public setSuppressed(suppressed?: boolean): Promise<this>;
|
||||
public edit(options: VoiceStateEditOptions): Promise<this>;
|
||||
public fetch(force?: boolean): Promise<VoiceState>;
|
||||
}
|
||||
|
||||
// tslint:disable-next-line no-empty-interface
|
||||
@@ -4627,6 +4628,7 @@ export class UserManager extends CachedManager<Snowflake, User, UserResolvable>
|
||||
export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState> {
|
||||
private constructor(guild: Guild, iterable?: Iterable<RawVoiceStateData>);
|
||||
public guild: Guild;
|
||||
public fetch(member: GuildMemberResolvable | '@me', options?: BaseFetchOptions): Promise<VoiceState>;
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
@@ -47,6 +47,7 @@ import {
|
||||
APIUnavailableGuild,
|
||||
APIUser,
|
||||
APIVoiceRegion,
|
||||
APIVoiceState,
|
||||
APIWebhook,
|
||||
GatewayActivity,
|
||||
GatewayActivityAssets,
|
||||
@@ -62,7 +63,6 @@ import {
|
||||
GatewayPresenceUpdate,
|
||||
GatewayReadyDispatchData,
|
||||
GatewayTypingStartDispatchData,
|
||||
GatewayVoiceState,
|
||||
RESTAPIPartialCurrentUserGuild,
|
||||
RESTGetAPIWebhookWithTokenResult,
|
||||
RESTPatchAPIChannelMessageJSONBody,
|
||||
@@ -195,7 +195,7 @@ export type RawUserData =
|
||||
|
||||
export type RawVoiceRegionData = APIVoiceRegion;
|
||||
|
||||
export type RawVoiceStateData = GatewayVoiceState | Omit<GatewayVoiceState, 'guild_id'>;
|
||||
export type RawVoiceStateData = APIVoiceState | Omit<APIVoiceState, 'guild_id'>;
|
||||
|
||||
export type RawWebhookData =
|
||||
| APIWebhook
|
||||
|
||||
Reference in New Issue
Block a user