diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index bd5a07a0b37b..c09fc81de62e 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -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; + } } /** diff --git a/typings/index.d.ts b/typings/index.d.ts index 992cd8180bd2..2cc0936dfeac 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -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; public setUserLimit(userLimit: number, reason?: string): Promise;