mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
fix(VoiceChannel): NSFW property (v13) (#8161)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com> Co-authored-by: pat <73502164+nyapat@users.noreply.github.com>
This commit is contained in:
@@ -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
@@ -2660,6 +2660,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>;
|
||||
|
||||
Reference in New Issue
Block a user