|
|
@@ -57,10 +57,8 @@ namespace Discord.Commands |
|
|
|
|
|
|
|
if (ChannelPermission.HasValue) |
|
|
|
{ |
|
|
|
var guildChannel = context.Channel as IGuildChannel; |
|
|
|
|
|
|
|
ChannelPermissions perms; |
|
|
|
if (guildChannel != null) |
|
|
|
if (context.Channel is IGuildChannel guildChannel) |
|
|
|
perms = guildUser.GetPermissions(guildChannel); |
|
|
|
else |
|
|
|
perms = ChannelPermissions.All(context.Channel); |
|
|
|