C#7 TODOs

This commit is contained in:
Christopher F
2017-04-23 15:13:31 -04:00
parent 3dfa54e56e
commit 6000b15c4d
5 changed files with 59 additions and 62 deletions

View File

@@ -150,9 +150,7 @@ namespace Discord
if (perms != null)
resolvedPermissions = (resolvedPermissions & ~perms.Value.DenyValue) | perms.Value.AllowValue;
//TODO: C#7 Typeswitch candidate
var textChannel = channel as ITextChannel;
if (textChannel != null)
if (channel is ITextChannel textChannel)
{
if (!GetValue(resolvedPermissions, ChannelPermission.ReadMessages))
{