fix(vcs): nsfw property (#8132)

This commit is contained in:
pat
2022-06-21 07:35:42 -05:00
committed by GitHub
parent f1ac17c961
commit 2eeaad6f27
2 changed files with 11 additions and 0 deletions

View File

@@ -20,6 +20,12 @@ class VoiceChannel extends BaseGuildVoiceChannel {
*/ */
this.messages = new MessageManager(this); this.messages = new MessageManager(this);
/**
* If the guild considers this channel NSFW
* @type {boolean}
*/
this.nsfw = Boolean(data.nsfw);
this._patch(data); this._patch(data);
} }
@@ -55,6 +61,10 @@ class VoiceChannel extends BaseGuildVoiceChannel {
*/ */
this.rateLimitPerUser = data.rate_limit_per_user; this.rateLimitPerUser = data.rate_limit_per_user;
} }
if ('nsfw' in data) {
this.nsfw = Boolean(data.nsfw);
}
} }
/** /**

View File

@@ -2716,6 +2716,7 @@ export class VoiceChannel extends TextBasedChannelMixin(BaseGuildVoiceChannel, [
public videoQualityMode: VideoQualityMode | null; public videoQualityMode: VideoQualityMode | null;
public get speakable(): boolean; public get speakable(): boolean;
public type: ChannelType.GuildVoice; public type: ChannelType.GuildVoice;
public nsfw: boolean;
public rateLimitPerUser: number | null; public rateLimitPerUser: number | null;
public setBitrate(bitrate: number, reason?: string): Promise<VoiceChannel>; public setBitrate(bitrate: number, reason?: string): Promise<VoiceChannel>;
public setUserLimit(userLimit: number, reason?: string): Promise<VoiceChannel>; public setUserLimit(userLimit: number, reason?: string): Promise<VoiceChannel>;