fix(VoiceChannel): NSFW property (v13)
https://github.com/discordjs/discord.js/pull/8161 v13.8.1
This commit is contained in:
parent
64c7dd5dd7
commit
4c0dfadc05
@ -24,6 +24,12 @@ class VoiceChannel extends BaseGuildVoiceChannel {
|
||||
*/
|
||||
this.messages = new MessageManager(this);
|
||||
|
||||
/**
|
||||
* If the guild considers this channel NSFW
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.nsfw = Boolean(data.nsfw);
|
||||
|
||||
this._patch(data);
|
||||
}
|
||||
|
||||
@ -59,6 +65,10 @@ class VoiceChannel extends BaseGuildVoiceChannel {
|
||||
*/
|
||||
this.rateLimitPerUser = data.rate_limit_per_user;
|
||||
}
|
||||
|
||||
if ('nsfw' in data) {
|
||||
this.nsfw = data.nsfw;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@ -2802,6 +2802,7 @@ export class VoiceChannel extends TextBasedChannelMixin(BaseGuildVoiceChannel, [
|
||||
public readonly editable: boolean;
|
||||
public readonly speakable: boolean;
|
||||
public type: 'GUILD_VOICE';
|
||||
public nsfw: boolean;
|
||||
public rateLimitPerUser: number | null;
|
||||
public setBitrate(bitrate: number, reason?: string): Promise<VoiceChannel>;
|
||||
public setUserLimit(userLimit: number, reason?: string): Promise<VoiceChannel>;
|
||||
|
Loading…
Reference in New Issue
Block a user