From 064fa164a0d89da5b624894a1cc2cfd9cd53cc08 Mon Sep 17 00:00:00 2001 From: Rootspring <66250972+cheesycod@users.noreply.github.com> Date: Mon, 11 Apr 2022 02:11:53 +0530 Subject: [PATCH] Add guild NSFW level (#1029) * Add guild NSFW level * Fix typo * fix(structs): typo Co-authored-by: nitroflap --- structs.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/structs.go b/structs.go index f91297bea..c2927b5bb 100644 --- a/structs.go +++ b/structs.go @@ -552,6 +552,17 @@ const ( ExplicitContentFilterAllMembers ExplicitContentFilterLevel = 2 ) +// GuildNSFWLevel type definition +type GuildNSFWLevel int + +// Constants for GuildNSFWLevel levels from 0 to 3 inclusive +const ( + GuildNSFWLevelDefault GuildNSFWLevel = 0 + GuildNSFWLevelExplicit GuildNSFWLevel = 1 + GuildNSFWLevelSafe GuildNSFWLevel = 2 + GuildNSFWLevelAgeRestricted GuildNSFWLevel = 3 +) + // MfaLevel type definition type MfaLevel int @@ -675,6 +686,9 @@ type Guild struct { // The explicit content filter level ExplicitContentFilter ExplicitContentFilterLevel `json:"explicit_content_filter"` + // The NSFW Level of the guild + NSFWLevel GuildNSFWLevel `json:"nsfw_level"` + // The list of enabled guild features Features []string `json:"features"`