Bläddra i källkod

Fix examples.

Chris Rhodes 9 år sedan
förälder
incheckning
da20bf63b5
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 1
      examples/api_basic/api_basic.go
  2. 1 1
      examples/new_basic/new_basic.go

+ 1 - 1
examples/api_basic/api_basic.go

@@ -57,7 +57,7 @@ func main() {
 
 // This function will be called (due to above assignment) every time a new
 // message is created on any channel that the autenticated user has access to.
-func messageCreate(s *discordgo.Session, m discordgo.Message) {
+func messageCreate(s *discordgo.Session, m *discordgo.Message) {
 
 	// Print message to stdout.
 	fmt.Printf("%20s %20s %20s > %s\n", m.ChannelID, time.Now().Format(time.Stamp), m.Author.Username, m.Content)

+ 1 - 1
examples/new_basic/new_basic.go

@@ -39,7 +39,7 @@ func main() {
 
 // This function will be called (due to above assignment) every time a new
 // message is created on any channel that the autenticated user has access to.
-func messageCreate(s *discordgo.Session, m discordgo.Message) {
+func messageCreate(s *discordgo.Session, m *discordgo.Message) {
 
 	// Print message to stdout.
 	fmt.Printf("%20s %20s %20s > %s\n", m.ChannelID, time.Now().Format(time.Stamp), m.Author.Username, m.Content)