code: public static long getEffectivePermission(Member member)
      {
          Checks.notNull(member, "Member");
  
          if (member.isOwner())
              return Permission.ALL_PERMISSIONS;
          //Default to binary OR of all global permissions in this guild
          long permission = member.getGuild().getPublicRole().getPermissionsRaw();
          for (Role role : member.getRoles())
          {
              permission |= role.getPermissionsRaw();
              if (isApplied(permission, Permission.ADMINISTRATOR.getRawValue()))
                  return Permission.ALL_PERMISSIONS;
          }
  
          return permission;
      }
docs: Gets the {@code long} representation of the effective permissions allowed for this {@link net.dv8tion.jda.core.entities.Member Member}
  in this {@link net.dv8tion.jda.core.entities.Guild Guild}. This can be used in conjunction with
  {@link net.dv8tion.jda.core.Permission#getPermissions(long) Permission.getPermissions(int)} to easily get a list of all
  {@link net.dv8tion.jda.core.Permission Permissions} that this member has in this {@link net.dv8tion.jda.core.entities.Guild Guild}.
  
  <p><b>This only returns the Guild-level permissions!</b>
  
  @param  member
  The {@link net.dv8tion.jda.core.entities.Member Member} whose permissions are being checked.
  
  @throws IllegalArgumentException
  if any of the provided parameters is {@code null}
  or the provided entities are not from the same guild
  
  @return The {@code long} representation of the literal permissions that
  this {@link net.dv8tion.jda.core.entities.Member Member} has in this {@link net.dv8tion.jda.core.entities.Guild Guild}.