1
0
Fork 0
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:
mavolin 2020-12-08 20:46:49 +01:00 committed by diamondburned
parent 5e2af90fd0
commit 9911a3d662

View file

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