From 2fda7ce223a66a5b70b66987c22c3c94d022ee66 Mon Sep 17 00:00:00 2001 From: Bruce Date: Tue, 5 Sep 2017 20:05:02 +0000 Subject: [PATCH 01/12] Bump to v0.17.0 --- discord.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord.go b/discord.go index 04d4719..40eabe1 100644 --- a/discord.go +++ b/discord.go @@ -21,7 +21,7 @@ import ( ) // VERSION of DiscordGo, follows Semantic Versioning. (http://semver.org/) -const VERSION = "0.17.0-dev" +const VERSION = "0.17.0" // ErrMFA will be risen by New when the user has 2FA. var ErrMFA = errors.New("account has 2FA enabled") From e4487b30d4d846b1fdc08fd3982bd5b9965a8cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Bo=C3=9Fe?= Date: Tue, 10 Oct 2017 18:21:39 +0200 Subject: [PATCH 02/12] Add members from GuildMembersChunk to state (#454) --- state.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/state.go b/state.go index 35a8e75..0cc1f73 100644 --- a/state.go +++ b/state.go @@ -816,6 +816,13 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) { if s.TrackMembers { err = s.MemberRemove(t.Member) } + case *GuildMembersChunk: + if s.TrackMembers { + for i := range t.Members { + t.Members[i].GuildID = t.GuildID + err = s.MemberAdd(t.Members[i]) + } + } case *GuildRoleCreate: if s.TrackRoles { err = s.RoleAdd(t.GuildID, t.Role) From 9ce745633f5df2849c8f03d7e8cd0b1fb6d35001 Mon Sep 17 00:00:00 2001 From: Chris Rhodes Date: Tue, 10 Oct 2017 09:21:53 -0700 Subject: [PATCH 03/12] Revert "Add members from GuildMembersChunk to state (#454)" (#455) This reverts commit e4487b30d4d846b1fdc08fd3982bd5b9965a8cc9. --- state.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/state.go b/state.go index 0cc1f73..35a8e75 100644 --- a/state.go +++ b/state.go @@ -816,13 +816,6 @@ func (s *State) OnInterface(se *Session, i interface{}) (err error) { if s.TrackMembers { err = s.MemberRemove(t.Member) } - case *GuildMembersChunk: - if s.TrackMembers { - for i := range t.Members { - t.Members[i].GuildID = t.GuildID - err = s.MemberAdd(t.Members[i]) - } - } case *GuildRoleCreate: if s.TrackRoles { err = s.RoleAdd(t.GuildID, t.Role) From 42f1f24287bcba5a18df8fd14ea60150ef5786a2 Mon Sep 17 00:00:00 2001 From: Spencer Davies Date: Thu, 19 Oct 2017 23:47:14 -0600 Subject: [PATCH 04/12] added clarification when initializing discordgo from the code I ran on my system with the latest changes this seems to be the syntax for the authentication tokens. I'm guessing it was just never updated. Let me know if this is incorrect. Thanks! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb9f14f..acc72bf 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Construct a new Discord client which can be used to access the variety of Discord API functions and to set callback functions for Discord events. ```go -discord, err := discordgo.New("authentication token") +discord, err := discordgo.New("Bot " + "authentication token") ``` See Documentation and Examples below for more detailed information. From 9c180babb126bb97db0c16ed1a1615a89823bf28 Mon Sep 17 00:00:00 2001 From: Davor Kapsa Date: Fri, 26 Jan 2018 22:40:25 +0100 Subject: [PATCH 05/12] travis: update go versions --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c181dda..fe626fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: go go: - - 1.7 - - 1.8 - - 1.9 + - 1.7.x + - 1.8.x + - 1.9.x install: - go get github.com/bwmarrin/discordgo - go get -v . From 544e4b9a8c70a0f820e37a09558f5f5795f3b8e4 Mon Sep 17 00:00:00 2001 From: Jesse <34263365+NewWinter@users.noreply.github.com> Date: Sun, 12 May 2019 19:14:27 -0600 Subject: [PATCH 06/12] Add proper response type for GuildBans docs The previous documentation stated that the response type was an array of User structures, when the function return an array of GuildBan structures. --- restapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/restapi.go b/restapi.go index 84a2a31..6023cc3 100644 --- a/restapi.go +++ b/restapi.go @@ -675,7 +675,7 @@ func (s *Session) GuildLeave(guildID string) (err error) { return } -// GuildBans returns an array of User structures for all bans of a +// GuildBans returns an array of GuildBan structures for all bans of a // given guild. // guildID : The ID of a Guild. func (s *Session) GuildBans(guildID string) (st []*GuildBan, err error) { From 8713b45ae71f9ab061385c60e7ffae8f9e65a85c Mon Sep 17 00:00:00 2001 From: Julian Y Date: Sat, 3 Aug 2019 23:48:24 -0700 Subject: [PATCH 07/12] 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 08/12] 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 09/12] 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 10/12] 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 From 8e3862b14be0a3646949474025e5d28e21eb2a39 Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Fri, 18 Oct 2019 10:45:07 -0500 Subject: [PATCH 11/12] Bump version to v0.20.0 --- discord.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord.go b/discord.go index cb43e7e..f1ba0ee 100644 --- a/discord.go +++ b/discord.go @@ -21,7 +21,7 @@ import ( ) // VERSION of DiscordGo, follows Semantic Versioning. (http://semver.org/) -const VERSION = "0.20.0-alpha" +const VERSION = "0.20.0" // ErrMFA will be risen by New when the user has 2FA. var ErrMFA = errors.New("account has 2FA enabled") From dd99dea7adba674baa401e52362d6e330b50acf8 Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Fri, 18 Oct 2019 11:23:41 -0500 Subject: [PATCH 12/12] Remove go1.13 from go.mod, bump version to v0.20.1 Go 1.13 was accidently added, this backs it back out. I don't think there's really much impact from this but I would prefer it not be in there for this release. --- discord.go | 2 +- go.mod | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/discord.go b/discord.go index f1ba0ee..76f1ad9 100644 --- a/discord.go +++ b/discord.go @@ -21,7 +21,7 @@ import ( ) // VERSION of DiscordGo, follows Semantic Versioning. (http://semver.org/) -const VERSION = "0.20.0" +const VERSION = "0.20.1" // ErrMFA will be risen by New when the user has 2FA. var ErrMFA = errors.New("account has 2FA enabled") diff --git a/go.mod b/go.mod index 8cd2cf6..2ff8868 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,3 @@ require ( github.com/gorilla/websocket v1.4.0 golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16 ) - -go 1.13