mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(vcs): nsfw property (#8132)
This commit is contained in:
@@ -20,6 +20,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);
|
||||
}
|
||||
|
||||
@@ -55,6 +61,10 @@ class VoiceChannel extends BaseGuildVoiceChannel {
|
||||
*/
|
||||
this.rateLimitPerUser = data.rate_limit_per_user;
|
||||
}
|
||||
|
||||
if ('nsfw' in data) {
|
||||
this.nsfw = Boolean(data.nsfw);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
@@ -2716,6 +2716,7 @@ export class VoiceChannel extends TextBasedChannelMixin(BaseGuildVoiceChannel, [
|
||||
public videoQualityMode: VideoQualityMode | null;
|
||||
public get speakable(): boolean;
|
||||
public type: ChannelType.GuildVoice;
|
||||
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