Interface IPermissionHolder

  • All Known Subinterfaces:
    Member, Role

    public interface IPermissionHolder
    Marker for entities that hold Permissions within JDA
    Since:
    3.0
    • Method Detail

      • getGuild

        Guild getGuild()
        The Guild to which this PermissionHolder is related
        Returns:
        A never-null Guild to which this PermissionHolder is linked
      • getPermissions

        java.util.List<Permission> getPermissions()
        The Guild-Wide Permissions this PermissionHolder holds.
        Returns:
        An immutable List of Permissions granted to this PermissionHolder.
      • hasPermission

        boolean hasPermission​(Permission... permissions)
        Checks whether or not this PermissionHolder has the given Permissions in the Guild.
        Parameters:
        permissions - Permissions to check for.
        Returns:
        True, if all of the specified Permissions are granted to this PermissionHolder.
      • hasPermission

        boolean hasPermission​(java.util.Collection<Permission> permissions)
        Checks whether or not this PermissionHolder has the Permissions in the provided Collection<Permission> in the Guild.
        Parameters:
        permissions - Permissions to check for.
        Returns:
        True, if all of the specified Permissions are granted to this PermissionHolder.
        See Also:
        EnumSet
      • hasPermission

        boolean hasPermission​(Channel channel,
                              Permission... permissions)
        Checks whether or not this PermissionHolder has the given Permissions in the specified Channel.
        Parameters:
        channel - The Channel in which to check.
        permissions - Permissions to check for.
        Returns:
        True, if all of the specified Permissions are granted to this PermissionHolder in the provided Channel.
        See Also:
        EnumSet
      • hasPermission

        boolean hasPermission​(Channel channel,
                              java.util.Collection<Permission> permissions)
        Checks whether or not this PermissionHolder has the Permissions in the provided Collection<Permission> in the specified Channel.
        Parameters:
        channel - The Channel in which to check.
        permissions - Permissions to check for.
        Returns:
        True, if all of the specified Permissions are granted to this PermissionHolder in the provided Channel.