From 8713b45ae71f9ab061385c60e7ffae8f9e65a85c Mon Sep 17 00:00:00 2001 From: Julian Y Date: Sat, 3 Aug 2019 23:48:24 -0700 Subject: [PATCH 1/4] Create new VerificationLevel VerificationLevelVeryHigh Closes #677 --- structs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/structs.go b/structs.go index 4465ec5..9db3a96 100644 --- a/structs.go +++ b/structs.go @@ -312,12 +312,13 @@ func (e *Emoji) APIName() string { // VerificationLevel type definition type VerificationLevel int -// Constants for VerificationLevel levels from 0 to 3 inclusive +// Constants for VerificationLevel levels from 0 to 4 inclusive const ( VerificationLevelNone VerificationLevel = iota VerificationLevelLow VerificationLevelMedium VerificationLevelHigh + VerificationLevelVeryHigh ) // ExplicitContentFilterLevel type definition From 792b209680468e54d4fc96d1c4725f1af0d5385d Mon Sep 17 00:00:00 2001 From: Julian Y Date: Sun, 4 Aug 2019 01:28:49 -0700 Subject: [PATCH 2/4] Modify GuildEdit bounds check --- restapi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restapi.go b/restapi.go index 6023cc3..503ac14 100644 --- a/restapi.go +++ b/restapi.go @@ -617,10 +617,10 @@ func (s *Session) GuildCreate(name string) (st *Guild, err error) { // g : A GuildParams struct with the values Name, Region and VerificationLevel defined. func (s *Session) GuildEdit(guildID string, g GuildParams) (st *Guild, err error) { - // Bounds checking for VerificationLevel, interval: [0, 3] + // Bounds checking for VerificationLevel, interval: [0, 4] if g.VerificationLevel != nil { val := *g.VerificationLevel - if val < 0 || val > 3 { + if val < 0 || val > 4 { err = ErrVerificationLevelBounds return } From e36ed7520eee63967cc1b9c22c4c96e217b18de1 Mon Sep 17 00:00:00 2001 From: Patrik Lundin Date: Wed, 7 Aug 2019 08:15:07 +0200 Subject: [PATCH 3/4] Typo: sythetic -> synthetic --- events.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/events.go b/events.go index c4fb520..7c2195d 100644 --- a/events.go +++ b/events.go @@ -10,15 +10,15 @@ import ( //go:generate go run tools/cmd/eventhandlers/main.go // Connect is the data for a Connect event. -// This is a sythetic event and is not dispatched by Discord. +// This is a synthetic event and is not dispatched by Discord. type Connect struct{} // Disconnect is the data for a Disconnect event. -// This is a sythetic event and is not dispatched by Discord. +// This is a synthetic event and is not dispatched by Discord. type Disconnect struct{} // RateLimit is the data for a RateLimit event. -// This is a sythetic event and is not dispatched by Discord. +// This is a synthetic event and is not dispatched by Discord. type RateLimit struct { *TooManyRequests URL string From 97726fe5b6c2493ef66ae0bf4dfcb2dc349c08a9 Mon Sep 17 00:00:00 2001 From: Haze Booth Date: Sat, 28 Sep 2019 03:34:22 -0400 Subject: [PATCH 4/4] Fix typo in ErrorEmbedDisabled --- structs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structs.go b/structs.go index 9db3a96..44ffd13 100644 --- a/structs.go +++ b/structs.go @@ -957,7 +957,7 @@ const ( ErrCodeMissingAccess = 50001 ErrCodeInvalidAccountType = 50002 ErrCodeCannotExecuteActionOnDMChannel = 50003 - ErrCodeEmbedCisabled = 50004 + ErrCodeEmbedDisabled = 50004 ErrCodeCannotEditFromAnotherUser = 50005 ErrCodeCannotSendEmptyMessage = 50006 ErrCodeCannotSendMessagesToThisUser = 50007