mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
feat(Guild): nsfw guilds (#5525)
Co-authored-by: Advaith <advaithj1@gmail.com>
This commit is contained in:
@@ -101,6 +101,14 @@ class Guild extends Base {
|
|||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.shardID = data.shardID;
|
this.shardID = data.shardID;
|
||||||
|
|
||||||
|
if ('nsfw' in data) {
|
||||||
|
/**
|
||||||
|
* Whether the guild is designated as not safe for work
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
this.nsfw = data.nsfw;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@@ -641,6 +641,7 @@ declare module 'discord.js' {
|
|||||||
public mfaLevel: number;
|
public mfaLevel: number;
|
||||||
public name: string;
|
public name: string;
|
||||||
public readonly nameAcronym: string;
|
public readonly nameAcronym: string;
|
||||||
|
public nsfw: boolean;
|
||||||
public ownerID: Snowflake;
|
public ownerID: Snowflake;
|
||||||
public readonly partnered: boolean;
|
public readonly partnered: boolean;
|
||||||
public preferredLocale: string;
|
public preferredLocale: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user