| @@ -149,7 +149,7 @@ | |||||
| <Compile Include="Entities\Rest\Guilds\GuildIntegration.cs" /> | <Compile Include="Entities\Rest\Guilds\GuildIntegration.cs" /> | ||||
| <Compile Include="Entities\Rest\Guilds\IntegrationAccount.cs" /> | <Compile Include="Entities\Rest\Guilds\IntegrationAccount.cs" /> | ||||
| <Compile Include="Entities\Rest\Users\Connection.cs" /> | <Compile Include="Entities\Rest\Users\Connection.cs" /> | ||||
| <Compile Include="Entities\Rest\Helper\PermissionHelper.cs" /> | |||||
| <Compile Include="Entities\Shared\Helpers\PermissionHelper.cs" /> | |||||
| <Compile Include="Entities\Rest\Invites\GuildInvite.cs" /> | <Compile Include="Entities\Rest\Invites\GuildInvite.cs" /> | ||||
| <Compile Include="Entities\Rest\Invites\Invite.cs" /> | <Compile Include="Entities\Rest\Invites\Invite.cs" /> | ||||
| <Compile Include="Entities\Rest\Invites\PublicInvite.cs" /> | <Compile Include="Entities\Rest\Invites\PublicInvite.cs" /> | ||||
| @@ -1,4 +1,4 @@ | |||||
| namespace Discord.Rest | |||||
| namespace Discord | |||||
| { | { | ||||
| public static class PermissionHelper | public static class PermissionHelper | ||||
| { | { | ||||
| @@ -44,11 +44,11 @@ | |||||
| switch (channel) | switch (channel) | ||||
| { | { | ||||
| case TextChannel _: | |||||
| case ITextChannel _: | |||||
| if (!PermissionUtilities.GetValue(resolvedPermissions, ChannelPermission.ReadMessages)) | if (!PermissionUtilities.GetValue(resolvedPermissions, ChannelPermission.ReadMessages)) | ||||
| resolvedPermissions = 0; //No read permission on a text channel removes all other permissions | resolvedPermissions = 0; //No read permission on a text channel removes all other permissions | ||||
| break; | break; | ||||
| case VoiceChannel _: | |||||
| case IVoiceChannel _: | |||||
| if (!PermissionUtilities.GetValue(resolvedPermissions, ChannelPermission.Connect)) | if (!PermissionUtilities.GetValue(resolvedPermissions, ChannelPermission.Connect)) | ||||
| resolvedPermissions = 0; //No read permission on a text channel removes all other permissions | resolvedPermissions = 0; //No read permission on a text channel removes all other permissions | ||||
| break; | break; | ||||