add(types): nsfw_level field to Guild (#958)

* feat(types/guilds): add nsfw_level field

* feat(types/guilds): add nsfw_level field to Guild

* style: format changed files

* Update guild.ts

* GuildNSFWLevel -> GuildNsfwLevel

* GuildNSFWLevel -> GuildNsfwLevel

* Update src/types/guilds/guild.ts

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
Co-authored-by: ITOH <to@itoh.at>
This commit is contained in:
rigormorrtiss
2021-05-22 09:50:10 +02:00
committed by GitHub
co-authored by Skillz4Killz ITOH
parent 8a4968f1af
commit a6f7789474
3 changed files with 13 additions and 2 deletions
+3
View File
@@ -26,3 +26,6 @@ desktop.ini
!.vscode/tasks.json
!.vscode/launch.json
*.code-workspace
# Sublime Text
.sublime-project
+3 -2
View File
@@ -13,6 +13,7 @@ import { DiscordSystemChannelFlags } from "./system_channel_flags.ts";
import { DiscordVerificationLevels } from "./verification_levels.ts";
import { WelcomeScreen } from "./welcome_screen.ts";
import type { StageInstance } from "../channels/stage_instance.ts";
import { GuildNsfwLevel } from "./guild_nsfw_level.ts";
/** https://discord.com/developers/docs/resources/guild#guild-object */
export interface Guild {
@@ -111,8 +112,8 @@ export interface Guild {
approximatePresenceCount?: number;
/** The welcome screen of a Community guild, shown to new members, returned in an Invite's guild object */
welcomeScreen?: WelcomeScreen;
/** `true` if this guild is designated as NSFW */
nsfw: boolean;
/** Guild NSFW level */
nsfwLevel: GuildNsfwLevel;
/** Stage instances in the guild */
stageInstances?: StageInstance[];
}
+7
View File
@@ -0,0 +1,7 @@
// TODO: add resource link
export enum GuildNsfwLevel {
Default,
Explicit,
Safe,
AgeRestricted,
}