Linting.
This commit is contained in:
parent
1b5dbef04e
commit
06b35cfe24
5 changed files with 10 additions and 5 deletions
|
@ -11,8 +11,8 @@
|
|||
|
||||
package discordgo
|
||||
|
||||
// The Discord API version used for the REST and Websocket API.
|
||||
var ApiVersion = "6"
|
||||
// APIVersion is the Discord API version used for the REST and Websocket API.
|
||||
var APIVersion = "6"
|
||||
|
||||
// Known Discord API Endpoints.
|
||||
var (
|
||||
|
@ -22,7 +22,7 @@ var (
|
|||
EndpointSmUpcoming = EndpointSm + "upcoming.json"
|
||||
|
||||
EndpointDiscord = "https://discordapp.com/"
|
||||
EndpointAPI = EndpointDiscord + "api/v" + ApiVersion + "/"
|
||||
EndpointAPI = EndpointDiscord + "api/v" + APIVersion + "/"
|
||||
EndpointGuilds = EndpointAPI + "guilds/"
|
||||
EndpointChannels = EndpointAPI + "channels/"
|
||||
EndpointUsers = EndpointAPI + "users/"
|
||||
|
|
|
@ -15,8 +15,10 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// MessageType is the type of Message
|
||||
type MessageType int
|
||||
|
||||
// Block contains the valid known MessageType values
|
||||
const (
|
||||
MessageTypeDefault MessageType = iota
|
||||
MessageTypeRecipientAdd
|
||||
|
|
2
state.go
2
state.go
|
@ -782,7 +782,7 @@ func (s *State) onReady(se *Session, r *Ready) (err error) {
|
|||
return nil
|
||||
}
|
||||
|
||||
// onInterface handles all events related to states.
|
||||
// OnInterface handles all events related to states.
|
||||
func (s *State) OnInterface(se *Session, i interface{}) (err error) {
|
||||
if s == nil {
|
||||
return ErrNilState
|
||||
|
|
|
@ -148,8 +148,10 @@ type Invite struct {
|
|||
Temporary bool `json:"temporary"`
|
||||
}
|
||||
|
||||
// ChannelType is the type of a Channel
|
||||
type ChannelType int
|
||||
|
||||
// Block contains known ChannelType values
|
||||
const (
|
||||
ChannelTypeGuildText ChannelType = iota
|
||||
ChannelTypeDM
|
||||
|
@ -604,6 +606,7 @@ const (
|
|||
PermissionAdministrator
|
||||
)
|
||||
|
||||
// Block contains Discord JSON Error Response codes
|
||||
const (
|
||||
ErrCodeUnknownAccount = 10001
|
||||
ErrCodeUnknownApplication = 10002
|
||||
|
|
2
wsapi.go
2
wsapi.go
|
@ -86,7 +86,7 @@ func (s *Session) Open() (err error) {
|
|||
}
|
||||
|
||||
// Add the version and encoding to the URL
|
||||
s.gateway = s.gateway + "?v=" + ApiVersion + "&encoding=json"
|
||||
s.gateway = s.gateway + "?v=" + APIVersion + "&encoding=json"
|
||||
}
|
||||
|
||||
header := http.Header{}
|
||||
|
|
Loading…
Reference in a new issue