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

@@ -25,7 +25,7 @@ public class WaifuInfo : DbEntity
var waifuUsername = Waifu.Username.TrimTo(20);
var claimerUsername = Claimer?.Username.TrimTo(20);
if (ClaimerId != null) claimer = $"{claimerUsername}#{Claimer.Discriminator}";
if (ClaimerId is not null) claimer = $"{claimerUsername}#{Claimer.Discriminator}";
if (AffinityId is null)
status = $"... but {waifuUsername}'s heart is empty";
else if (AffinityId == ClaimerId)
@@ -58,7 +58,7 @@ public class WaifuLbResult
var waifuUsername = Username.TrimTo(20);
var claimerUsername = Claimer?.TrimTo(20);
if (Claimer != null) claimer = $"{claimerUsername}#{ClaimerDiscrim}";
if (Claimer is not null) claimer = $"{claimerUsername}#{ClaimerDiscrim}";
if (Affinity is null)
status = $"... but {waifuUsername}'s heart is empty";
else if (Affinity + AffinityDiscrim == Claimer + ClaimerDiscrim)