From 0ab9d901e14a31ea5d9fb48ceeebab9f64949075 Mon Sep 17 00:00:00 2001 From: diamondburned Date: Sun, 7 Feb 2021 16:22:38 -0800 Subject: [PATCH] Example: Fixed simple bot intents --- _example/simple/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)