mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
feat(VoiceState): self mute/deaf methods (#3243)
* Implemented setSelfMute/Deaf, done typings, fixed bug in VoiceState with errors. * Completed requested changes * return send in sendVoiceStateUpdate so its a promise, update typings * Updated methods to return a boolean * Requested changes * Fix bug * Update src/structures/VoiceState.js Co-Authored-By: MrJacz <23615291+MrJacz@users.noreply.github.com> * fix
This commit is contained in:
7
typings/index.d.ts
vendored
7
typings/index.d.ts
vendored
@@ -1202,7 +1202,7 @@ declare module 'discord.js' {
|
||||
private onSessionDescription(mode: string, secret: string): void;
|
||||
private onSpeaking(data: object): void;
|
||||
private reconnect(token: string, endpoint: string): void;
|
||||
private sendVoiceStateUpdate(options: object): void;
|
||||
private sendVoiceStateUpdate(options: object): Promise<Shard>;
|
||||
private setSessionID(sessionID: string): void;
|
||||
private setSpeaking(value: BitFieldResolvable<SpeakingString>): void;
|
||||
private setTokenAndEndpoint(token: string, endpoint: string): void;
|
||||
@@ -1215,6 +1215,7 @@ declare module 'discord.js' {
|
||||
public receiver: VoiceReceiver;
|
||||
public speaking: Readonly<Speaking>;
|
||||
public status: VoiceStatus;
|
||||
public readonly voice: VoiceState;
|
||||
public voiceManager: ClientVoiceManager;
|
||||
public disconnect(): void;
|
||||
public play(input: VoiceBroadcast | Readable | string, options?: StreamOptions): StreamDispatcher;
|
||||
@@ -1284,8 +1285,10 @@ declare module 'discord.js' {
|
||||
public sessionID?: string;
|
||||
public readonly speaking: boolean | null;
|
||||
|
||||
public setDeaf(mute: boolean, reason?: string): Promise<GuildMember>;
|
||||
public setDeaf(deaf: boolean, reason?: string): Promise<GuildMember>;
|
||||
public setMute(mute: boolean, reason?: string): Promise<GuildMember>;
|
||||
public setSelfDeaf(deaf: boolean): Promise<boolean>;
|
||||
public setSelfMute(mute: boolean): Promise<boolean>;
|
||||
}
|
||||
|
||||
class VolumeInterface extends EventEmitter {
|
||||
|
||||
Reference in New Issue
Block a user