mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-27 09:12:53 +00:00
State: fix caching not working properly on user accounts
This commit is contained in:
parent
5e2af90fd0
commit
9911a3d662
|
@ -181,7 +181,14 @@ func (g *Gateway) AddIntents(i Intents) {
|
|||
}
|
||||
|
||||
// HasIntents reports if the Gateway has the passed Intents.
|
||||
//
|
||||
// If no intents are set, i.e. if using a user account HasIntents will always
|
||||
// return true.
|
||||
func (g *Gateway) HasIntents(intents Intents) bool {
|
||||
if g.Identifier.Intents == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
return g.Identifier.Intents.Has(intents)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue