Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Guild): nsfw guilds #5525

Merged
merged 3 commits into from Apr 18, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/structures/Guild.js
Expand Up @@ -101,6 +101,14 @@ class Guild extends Base {
* @type {number}
*/
this.shardID = data.shardID;

if ('nsfw' in data || typeof this.nsfw !== 'boolean') {
/**
* Whether the guild is designated as not safe for work
* @type {boolean}
*/
this.nsfw = Boolean(data.nsfw);
}
almostSouji marked this conversation as resolved.
Show resolved Hide resolved
}

/**
Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Expand Up @@ -641,6 +641,7 @@ declare module 'discord.js' {
public mfaLevel: number;
public name: string;
public readonly nameAcronym: string;
public nsfw: boolean;
public ownerID: Snowflake;
public readonly partnered: boolean;
public preferredLocale: string;
Expand Down