Open zekroTJA opened 3 years ago
As you can see here, when roles are added, updated or removed, only the roles itself are updated in the cache.
https://github.com/zekroTJA/dgrs/blob/51033d725a31cd60bf5a2a1acd08b92954001c73/state.go#L232-L237
https://github.com/zekroTJA/dgrs/blob/51033d725a31cd60bf5a2a1acd08b92954001c73/roles.go#L5-L9
The discordgo.Guild
object has a Property Roles
which keeps a list of references to role objects related to that guild. These are not updated in the Guild object in the Redis cache though, which might be a bit inconvenient when working with the guild object from the cache.
https://github.com/bwmarrin/discordgo/blob/f184824b8c4412b4450df468dd80b6047ab52f5b/structs.go#L735
I am not really sure though if the guild object should also be updated in the cache when a role of the guild has been updated.
I guess if it is linked with guild (eg role) that chache show be updated? And also do you have seperate cache for Role?
Can you show any examples of it