Merge branch 'master' into develop
This commit is contained in:
commit
fa53366faa
3 changed files with 7 additions and 6 deletions
|
@ -21,7 +21,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// VERSION of DiscordGo, follows Semantic Versioning. (http://semver.org/)
|
// VERSION of DiscordGo, follows Semantic Versioning. (http://semver.org/)
|
||||||
const VERSION = "0.21.0-devel"
|
const VERSION = "0.21.0-develop"
|
||||||
|
|
||||||
// ErrMFA will be risen by New when the user has 2FA.
|
// ErrMFA will be risen by New when the user has 2FA.
|
||||||
var ErrMFA = errors.New("account has 2FA enabled")
|
var ErrMFA = errors.New("account has 2FA enabled")
|
||||||
|
|
|
@ -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.
|
// g : A GuildParams struct with the values Name, Region and VerificationLevel defined.
|
||||||
func (s *Session) GuildEdit(guildID string, g GuildParams) (st *Guild, err error) {
|
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 {
|
if g.VerificationLevel != nil {
|
||||||
val := *g.VerificationLevel
|
val := *g.VerificationLevel
|
||||||
if val < 0 || val > 3 {
|
if val < 0 || val > 4 {
|
||||||
err = ErrVerificationLevelBounds
|
err = ErrVerificationLevelBounds
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -675,7 +675,7 @@ func (s *Session) GuildLeave(guildID string) (err error) {
|
||||||
return
|
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.
|
// given guild.
|
||||||
// guildID : The ID of a Guild.
|
// guildID : The ID of a Guild.
|
||||||
func (s *Session) GuildBans(guildID string) (st []*GuildBan, err error) {
|
func (s *Session) GuildBans(guildID string) (st []*GuildBan, err error) {
|
||||||
|
|
|
@ -327,12 +327,13 @@ func (e *Emoji) APIName() string {
|
||||||
// VerificationLevel type definition
|
// VerificationLevel type definition
|
||||||
type VerificationLevel int
|
type VerificationLevel int
|
||||||
|
|
||||||
// Constants for VerificationLevel levels from 0 to 3 inclusive
|
// Constants for VerificationLevel levels from 0 to 4 inclusive
|
||||||
const (
|
const (
|
||||||
VerificationLevelNone VerificationLevel = iota
|
VerificationLevelNone VerificationLevel = iota
|
||||||
VerificationLevelLow
|
VerificationLevelLow
|
||||||
VerificationLevelMedium
|
VerificationLevelMedium
|
||||||
VerificationLevelHigh
|
VerificationLevelHigh
|
||||||
|
VerificationLevelVeryHigh
|
||||||
)
|
)
|
||||||
|
|
||||||
// ExplicitContentFilterLevel type definition
|
// ExplicitContentFilterLevel type definition
|
||||||
|
@ -1015,7 +1016,7 @@ const (
|
||||||
ErrCodeMissingAccess = 50001
|
ErrCodeMissingAccess = 50001
|
||||||
ErrCodeInvalidAccountType = 50002
|
ErrCodeInvalidAccountType = 50002
|
||||||
ErrCodeCannotExecuteActionOnDMChannel = 50003
|
ErrCodeCannotExecuteActionOnDMChannel = 50003
|
||||||
ErrCodeEmbedCisabled = 50004
|
ErrCodeEmbedDisabled = 50004
|
||||||
ErrCodeCannotEditFromAnotherUser = 50005
|
ErrCodeCannotEditFromAnotherUser = 50005
|
||||||
ErrCodeCannotSendEmptyMessage = 50006
|
ErrCodeCannotSendEmptyMessage = 50006
|
||||||
ErrCodeCannotSendMessagesToThisUser = 50007
|
ErrCodeCannotSendMessagesToThisUser = 50007
|
||||||
|
|
Loading…
Reference in a new issue