summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/bwmarrin
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/bwmarrin')
-rw-r--r--vendor/github.com/bwmarrin/discordgo/discord.go2
-rw-r--r--vendor/github.com/bwmarrin/discordgo/restapi.go7
2 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/bwmarrin/discordgo/discord.go b/vendor/github.com/bwmarrin/discordgo/discord.go
index 76f1ad94..ac4e5426 100644
--- a/vendor/github.com/bwmarrin/discordgo/discord.go
+++ b/vendor/github.com/bwmarrin/discordgo/discord.go
@@ -21,7 +21,7 @@ import (
)
// VERSION of DiscordGo, follows Semantic Versioning. (http://semver.org/)
-const VERSION = "0.20.1"
+const VERSION = "0.20.2"
// ErrMFA will be risen by New when the user has 2FA.
var ErrMFA = errors.New("account has 2FA enabled")
diff --git a/vendor/github.com/bwmarrin/discordgo/restapi.go b/vendor/github.com/bwmarrin/discordgo/restapi.go
index 63b4e076..b5fa0fa4 100644
--- a/vendor/github.com/bwmarrin/discordgo/restapi.go
+++ b/vendor/github.com/bwmarrin/discordgo/restapi.go
@@ -88,7 +88,12 @@ func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b
req.Header.Set("authorization", s.Token)
}
- req.Header.Set("Content-Type", contentType)
+ // Discord's API returns a 400 Bad Request is Content-Type is set, but the
+ // request body is empty.
+ if b != nil {
+ req.Header.Set("Content-Type", contentType)
+ }
+
// TODO: Make a configurable static variable.
req.Header.Set("User-Agent", s.UserAgent)