Interface Permissable

All Superinterfaces:
Entity, GuildEntity, HasGuild, Snowflake, Timestamped
All Known Subinterfaces:
InteractionMember, Member, Role
All Known Implementing Classes:
InteractionMemberImpl, MemberImpl, RoleImpl

public interface Permissable extends GuildEntity, Snowflake
An entity which is permission-scoped in catnip.
Since:
13/2/19.
Author:
schlaubi
  • Method Details

    • permissions

      Set<Permission> permissions()
      Returns a list of the entity's permissions.
      Returns:
      a list of the entity's permissions
    • permissionsRaw

      default long permissionsRaw()
      Returns the raw permissions of the entity as a long.
      Returns:
      the raw permissions of the entity as a long
    • hasPermissions

      boolean hasPermissions(@Nonnull Collection<Permission> permissions)
      Checks whether the entity has the permissions or not.
      Parameters:
      permissions - The permissions to check.
      Returns:
      Whether the entity has the permissions or not
    • hasPermissions

      default boolean hasPermissions(@Nonnull Permission... permissions)
      Checks whether the entity has the permissions or not.
      Parameters:
      permissions - The permissions to check.
      Returns:
      Whether the entity has the permissions or not
    • hasPermissions

      boolean hasPermissions(@Nonnull GuildChannel channel, @Nonnull Collection<Permission> permissions)
      Checks whether the entity has the permissions or not in a specific GuildChannel.
      Parameters:
      channel - The channel in which the entity should have the permission
      permissions - The permissions to check.
      Returns:
      Whether the entity has the permissions or not
    • hasPermissions

      default boolean hasPermissions(@Nonnull GuildChannel channel, @Nonnull Permission... permissions)
      Checks whether the entity has the permissions or not in a specific GuildChannel.
      Parameters:
      channel - The channel in which the entity should have the permission.
      permissions - The permissions to check.
      Returns:
      Whether the entity has the permissions or not
    • canInteract

      boolean canInteract(@Nonnull Role role)
      Checks whether the entity can interact with a role or not.
      Parameters:
      role - The role the entity should interact with.
      Returns:
      Whether the entity can interact with a role or not
    • canInteract

      boolean canInteract(@Nonnull Member member)
      Checks whether the entity can interact with a member or not.
      Parameters:
      member - The member the entity should interact with.
      Returns:
      Whether the entity can interact with a member or not