More target-typed new and redundant paranthesis cleanup

This commit is contained in:
Kwoth
2021-12-20 00:33:11 +01:00
parent 345a9e9524
commit 1b2017024c
152 changed files with 573 additions and 580 deletions

View File

@@ -33,7 +33,7 @@ public class GreetSettingsService : INService
_bss = bss;
_eb = eb;
GuildConfigsCache = new ConcurrentDictionary<ulong, GreetSettings>(
GuildConfigsCache = new(
bot.AllGuildConfigs
.ToDictionary(g => g.GuildId, GreetSettings.Create));
@@ -51,8 +51,8 @@ public class GreetSettingsService : INService
// if user is a new booster
// or boosted again the same server
if ((oldUser is { PremiumSince: null } && newUser is { PremiumSince: not null })
|| (oldUser?.PremiumSince is DateTimeOffset oldDate
&& newUser?.PremiumSince is DateTimeOffset newDate
|| (oldUser?.PremiumSince is { } oldDate
&& newUser?.PremiumSince is { } newDate
&& newDate > oldDate))
{
var conf = GetOrAddSettingsForGuild(newUser.Guild.Id);