Update dependencies (#975)
This commit is contained in:
+1
-1
@@ -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")
|
||||
|
||||
+6
-1
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user