Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state: Use store roles for calculating overrides #411

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

twoscott
Copy link
Contributor

@twoscott twoscott commented Nov 3, 2023

Currently, the state.Permissions() helper method uses Guild.Roles to calculate the permission overrides. Guild.Roles aren't updated by Guild Role Update events, so this can result in the helper method giving unexpected results when a role was updated, but no Guild Update event has happened since. This change pulls roles from store.Roles() in the helper method, and passes them to the CalcOverrides method, which now uses the passed in roles instead of Guild.Roles.

state/state.go Show resolved Hide resolved
@diamondburned diamondburned merged commit d9681ea into diamondburned:v3 Nov 3, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants