Interface ServerChannelChangeOverwrittenPermissionsEvent

    • Method Detail

      • getNewPermissions

        Permissions getNewPermissions()
        Gets the new overwritten permissions.
        Returns:
        The new permissions.
      • getOldPermissions

        Permissions getOldPermissions()
        Gets the old overwritten permissions.
        Returns:
        The old permissions.
      • getEntityId

        long getEntityId()
        Gets the if of the affected entity.
        Returns:
        The id of the affected entity.
      • isUserEntity

        default boolean isUserEntity()
        Checks if the affected entity is a user.
        Returns:
        Whether the affected entity is a user.
      • isRoleEntity

        default boolean isRoleEntity()
        Checks if the affected entity is a role.
        Returns:
        Whether the affected entity is a role.
      • getEntity

        java.util.Optional<DiscordEntity> getEntity()
        Gets the entity which permissions were changed. The entity is a user or a role.
        Returns:
        The entity which permissions were changed.
      • getUser

        java.util.Optional<User> getUser()
        Gets the user which permissions were changed. Only present if the entity is a user!
        Returns:
        The user which permissions were changed.
      • getRole

        java.util.Optional<Role> getRole()
        Gets the role which permissions were changed. Only present if the entity is a role!
        Returns:
        The role which permissions were changed.