Using pattern matching for nulls where applicable, discarded unused lambda parameters, cleaned up some classes. Unignored ServerLog commands which was mistakenly ignored due to a .gitignore rule

This commit is contained in:
Kwoth
2022-01-01 08:44:51 +01:00
parent f81f9fadd3
commit 9b4eb21321
91 changed files with 1591 additions and 224 deletions

View File

@@ -50,13 +50,13 @@ public class Replacer
Image = Replace(embedData.Image),
Url = Replace(embedData.Url)
};
if (embedData.Author != null)
if (embedData.Author is not null)
newEmbedData.Author = new()
{
Name = Replace(embedData.Author.Name), IconUrl = Replace(embedData.Author.IconUrl)
};
if (embedData.Fields != null)
if (embedData.Fields is not null)
{
var fields = new List<SmartTextEmbedField>();
foreach (var f in embedData.Fields)
@@ -71,7 +71,7 @@ public class Replacer
newEmbedData.Fields = fields.ToArray();
}
if (embedData.Footer != null)
if (embedData.Footer is not null)
newEmbedData.Footer = new()
{
Text = Replace(embedData.Footer.Text), IconUrl = Replace(embedData.Footer.IconUrl)