diff --git a/_example/simple/main.go b/_example/simple/main.go index fa67392..b189dfa 100644 --- a/_example/simple/main.go +++ b/_example/simple/main.go @@ -27,15 +27,15 @@ func main() { log.Println(c.Author.Username, "sent", c.Content) }) + // Add the needed Gateway intents. + s.Gateway.AddIntents(gateway.IntentGuildMessages) + s.Gateway.AddIntents(gateway.IntentDirectMessages) + if err := s.Open(); err != nil { log.Fatalln("Failed to connect:", err) } defer s.Close() - // Add the needed Gateway intents. - s.Gateway.AddIntents(gateway.IntentGuildMessages) - s.Gateway.AddIntents(gateway.IntentDirectMessages) - u, err := s.Me() if err != nil { log.Fatalln("Failed to get myself:", err)