1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-27 17:23:00 +00:00

Example: Fixed simple bot intents

This commit is contained in:
diamondburned 2021-02-07 16:22:38 -08:00
parent ac2f3ba68a
commit 0ab9d901e1

View file

@ -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)