1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-01 04:24:19 +00:00

state: Add missing error check

This commit is contained in:
twoscott 2023-11-04 04:03:22 +00:00 committed by Diamond
parent ff709fc16c
commit 4ef179343a

View file

@ -362,6 +362,9 @@ func (s *State) Permissions(
if merr != nil { if merr != nil {
return 0, fmt.Errorf("failed to get member: %w", merr) return 0, fmt.Errorf("failed to get member: %w", merr)
} }
if rerr != nil {
return 0, fmt.Errorf("failed to get roles: %w", rerr)
}
return discord.CalcOverrides(*g, *ch, *m, rs), nil return discord.CalcOverrides(*g, *ch, *m, rs), nil
} }