Changed all == null to is null and all !(* == null) to * is not null

This commit is contained in:
Kwoth
2021-06-19 08:24:09 +02:00
parent 81406cb46a
commit d8c7cdc7f4
125 changed files with 367 additions and 366 deletions

View File

@@ -53,7 +53,7 @@ namespace NadekoBot.Modules.Administration.Services
var conf = confs.FirstOrDefault(x => x.MessageId == msg.Id);
if (conf == null)
if (conf is null)
return;
// compare emote names for backwards compatibility :facepalm:
@@ -129,7 +129,7 @@ namespace NadekoBot.Modules.Administration.Services
var conf = confs.FirstOrDefault(x => x.MessageId == msg.Id);
if (conf == null)
if (conf is null)
return;
var reactionRole = conf.ReactionRoles.FirstOrDefault(x => x.EmoteName == reaction.Emote.Name || x.EmoteName == reaction.Emote.ToString());
@@ -137,7 +137,7 @@ namespace NadekoBot.Modules.Administration.Services
if (reactionRole != null)
{
var role = gusr.Guild.GetRole(reactionRole.RoleId);
if (role == null)
if (role is null)
return;
await gusr.RemoveRoleAsync(role).ConfigureAwait(false);
}