Merge pull request #482 from vim2meta/develop

Several typo fixes.
This commit is contained in:
Bruce 2017-11-20 08:38:18 -06:00 committed by GitHub
commit 9bb722e4fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View file

@ -6,7 +6,7 @@ type EventHandler interface {
Type() string Type() string
// Handle is called whenever an event of Type() happens. // Handle is called whenever an event of Type() happens.
// It is the recievers responsibility to type assert that the interface // It is the receivers responsibility to type assert that the interface
// is the expected struct. // is the expected struct.
Handle(*Session, interface{}) Handle(*Session, interface{})
} }

View file

@ -79,7 +79,7 @@ func main() {
ap.Name = Name ap.Name = Name
ap, err = dg.ApplicationCreate(ap) ap, err = dg.ApplicationCreate(ap)
if err != nil { if err != nil {
fmt.Println("error creating new applicaiton,", err) fmt.Println("error creating new application,", err)
return return
} }

View file

@ -42,7 +42,7 @@ var Logger func(msgL, caller int, format string, a ...interface{})
// msgL : LogLevel of the message // msgL : LogLevel of the message
// caller : 1 + the number of callers away from the message source // caller : 1 + the number of callers away from the message source
// format : Printf style message format // format : Printf style message format
// a ... : comma seperated list of values to pass // a ... : comma separated list of values to pass
func msglog(msgL, caller int, format string, a ...interface{}) { func msglog(msgL, caller int, format string, a ...interface{}) {
if Logger != nil { if Logger != nil {

View file

@ -1206,7 +1206,7 @@ func (s *Session) GuildEmbedEdit(guildID string, enabled bool, channelID string)
// Functions specific to Discord Channels // Functions specific to Discord Channels
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Channel returns a Channel strucutre of a specific Channel. // Channel returns a Channel structure of a specific Channel.
// channelID : The ID of the Channel you want returned. // channelID : The ID of the Channel you want returned.
func (s *Session) Channel(channelID string) (st *Channel, err error) { func (s *Session) Channel(channelID string) (st *Channel, err error) {
body, err := s.RequestWithBucketID("GET", EndpointChannel(channelID), nil, EndpointChannel(channelID)) body, err := s.RequestWithBucketID("GET", EndpointChannel(channelID), nil, EndpointChannel(channelID))
@ -1478,7 +1478,7 @@ func (s *Session) ChannelMessageDelete(channelID, messageID string) (err error)
} }
// ChannelMessagesBulkDelete bulk deletes the messages from the channel for the provided messageIDs. // ChannelMessagesBulkDelete bulk deletes the messages from the channel for the provided messageIDs.
// If only one messageID is in the slice call channelMessageDelete funciton. // If only one messageID is in the slice call channelMessageDelete function.
// If the slice is empty do nothing. // If the slice is empty do nothing.
// channelID : The ID of the channel for the messages to delete. // channelID : The ID of the channel for the messages to delete.
// messages : The IDs of the messages to be deleted. A slice of string IDs. A maximum of 100 messages. // messages : The IDs of the messages to be deleted. A slice of string IDs. A maximum of 100 messages.

View file

@ -203,7 +203,7 @@ func (e *Emoji) APIName() string {
return e.ID return e.ID
} }
// VerificationLevel type defination // 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 3 inclusive
@ -395,7 +395,7 @@ type Settings struct {
DeveloperMode bool `json:"developer_mode"` DeveloperMode bool `json:"developer_mode"`
} }
// Status type defination // Status type definition
type Status string type Status string
// Constants for Status with the different current available status // Constants for Status with the different current available status

View file

@ -68,7 +68,7 @@ type VoiceConnection struct {
voiceSpeakingUpdateHandlers []VoiceSpeakingUpdateHandler voiceSpeakingUpdateHandlers []VoiceSpeakingUpdateHandler
} }
// VoiceSpeakingUpdateHandler type provides a function defination for the // VoiceSpeakingUpdateHandler type provides a function definition for the
// VoiceSpeakingUpdate event // VoiceSpeakingUpdate event
type VoiceSpeakingUpdateHandler func(vc *VoiceConnection, vs *VoiceSpeakingUpdate) type VoiceSpeakingUpdateHandler func(vc *VoiceConnection, vs *VoiceSpeakingUpdate)
@ -246,7 +246,7 @@ type voiceOP2 struct {
} }
// WaitUntilConnected waits for the Voice Connection to // WaitUntilConnected waits for the Voice Connection to
// become ready, if it does not become ready it retuns an err // become ready, if it does not become ready it returns an err
func (v *VoiceConnection) waitUntilConnected() error { func (v *VoiceConnection) waitUntilConnected() error {
v.log(LogInformational, "called") v.log(LogInformational, "called")
@ -857,7 +857,7 @@ func (v *VoiceConnection) reconnect() {
} }
if v.session.DataReady == false || v.session.wsConn == nil { if v.session.DataReady == false || v.session.wsConn == nil {
v.log(LogInformational, "cannot reconenct to channel %s with unready session", v.ChannelID) v.log(LogInformational, "cannot reconnect to channel %s with unready session", v.ChannelID)
continue continue
} }

View file

@ -673,7 +673,7 @@ func (s *Session) onVoiceServerUpdate(st *VoiceServerUpdate) {
voice.GuildID = st.GuildID voice.GuildID = st.GuildID
voice.Unlock() voice.Unlock()
// Open a conenction to the voice server // Open a connection to the voice server
err := voice.open() err := voice.open()
if err != nil { if err != nil {
s.log(LogError, "onVoiceServerUpdate voice.open, %s", err) s.log(LogError, "onVoiceServerUpdate voice.open, %s", err)