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:
parent
ac2f3ba68a
commit
0ab9d901e1
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue