mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-13 18:58:27 -04:00
NadekoBot.Extensions should now be fully annotated with nullable reference types as well as many classes from NadekoBot.Common
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using NadekoBot.Services.Database.Models;
|
||||
#nullable disable
|
||||
using NadekoBot.Services.Database.Models;
|
||||
using NadekoBot.Common.TypeReaders;
|
||||
using NadekoBot.Modules.Utility.Common;
|
||||
using NadekoBot.Modules.Utility.Common.Exceptions;
|
||||
@@ -266,7 +267,7 @@ public class StreamRoleService : INService
|
||||
{
|
||||
try
|
||||
{
|
||||
addRole = addRole ?? user.Guild.GetRole(setting.AddRoleId);
|
||||
addRole ??= user.Guild.GetRole(setting.AddRoleId);
|
||||
if (addRole is null)
|
||||
throw new StreamRoleNotFoundException();
|
||||
|
||||
@@ -305,4 +306,4 @@ public class StreamRoleService : INService
|
||||
|
||||
private void UpdateCache(ulong guildId, StreamRoleSettings setting)
|
||||
=> guildSettings.AddOrUpdate(guildId, key => setting, (key, old) => setting);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user