Skip to content

Commit

Permalink
Fix nullable stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Pasi4K5 committed Mar 19, 2024
1 parent 301b106 commit 112652c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Numerous/Discord/OsuVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ await Task.WhenAll(

async Task AssignRoleAsync(OsuUserGroup group, bool add)
{
var roleId = guildConfig?.OsuRoles.FirstOrDefault(osuRole => osuRole.Group == group).RoleId;
var roleId = guildConfig.OsuRoles.FirstOrDefault(osuRole => osuRole.Group == group).RoleId;

if (roleId is null)
if (roleId == default)
{
return;
}

var role = guildUser.Guild.GetRole(roleId.Value);
var role = guildUser.Guild.GetRole(roleId);

if (role is not null)
{
Expand Down

0 comments on commit 112652c

Please sign in to comment.