mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-03 08:14:28 -05:00
Avoid awaiting possible null
This commit is contained in:
@@ -341,12 +341,15 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
|
|||||||
}
|
}
|
||||||
else // channel
|
else // channel
|
||||||
{
|
{
|
||||||
await ch?.SendConfirmAsync(_eb,
|
if (ch is not null)
|
||||||
|
{
|
||||||
|
await ch.SendConfirmAsync(_eb,
|
||||||
_strings.GetText(strs.level_up_channel(user.Mention,
|
_strings.GetText(strs.level_up_channel(user.Mention,
|
||||||
Format.Bold(newLevel.ToString())),
|
Format.Bold(newLevel.ToString())),
|
||||||
guild.Id));
|
guild.Id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else // global level
|
else // global level
|
||||||
{
|
{
|
||||||
var chan = notifyLoc switch
|
var chan = notifyLoc switch
|
||||||
|
|||||||
Reference in New Issue
Block a user