Skip to content

Commit

Permalink
Fixed "Missing Access" responses, when VIEW_CHANNEL denied no permiss…
Browse files Browse the repository at this point in the history
…ions are present
  • Loading branch information
MinnDevelopment committed Sep 23, 2017
1 parent 9245a83 commit 9447d26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/net/dv8tion/jda/core/utils/PermissionUtil.java
Expand Up @@ -362,8 +362,9 @@ public static long getEffectivePermission(Channel channel, Member member)
}
else if (!isApplied(permission, Permission.VIEW_CHANNEL.getRawValue()))
{
// When the permission to view the channel is not applied it is not granted
return permission & ~Permission.ALL_TEXT_PERMISSIONS;
//When the permission to view the channel is not applied it is not granted
// This means that we have no access to this channel at all
return 0;
}

final boolean isPerms = isApplied(permission, Permission.MANAGE_PERMISSIONS.getRawValue());
Expand Down

0 comments on commit 9447d26

Please sign in to comment.