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

@@ -19,7 +19,7 @@ public class GameVoiceChannelService : INService
_db = db;
_client = client;
GameVoiceChannels = new ConcurrentHashSet<ulong>(
GameVoiceChannels = new(
bot.AllGuildConfigs.Where(gc => gc.GameVoiceChannel != null)
.Select(gc => gc.GameVoiceChannel.Value));
@@ -40,8 +40,7 @@ public class GameVoiceChannelService : INService
//if the activity has changed, and is a playing activity
if (before.Activity != after.Activity
&& after.Activity != null
&& after.Activity.Type == Discord.ActivityType.Playing)
&& after.Activity is { Type: Discord.ActivityType.Playing })
{
//trigger gvc
await TriggerGvc(after, after.Activity.Name);