Skip to content

Commit

Permalink
State: fix case where Role would return nil error, even though no rol…
Browse files Browse the repository at this point in the history
…e was found
  • Loading branch information
mavolin authored and diamondburned committed Oct 18, 2020
1 parent 1bec575 commit 6dabffb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,10 @@ func (s *State) Role(guildID discord.GuildID, roleID discord.RoleID) (*discord.R
}
}

if role == nil {
return nil, ErrStoreNotFound
}

return role, nil
}

Expand Down

0 comments on commit 6dabffb

Please sign in to comment.