Interface GuildGroup

All Superinterfaces:
Group
All Known Subinterfaces:
NamedGuildGroup
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface GuildGroup extends Group
A group whose membership is defined at the guild level or higher (i.e. the channel is not taken into account).
Since:
1.0
Version:
1.0
API Note:
Despite the name, implementations of this interface do not need to take the guild into account for determining membership; they only cannot use the channel.
  • Method Summary

    Modifier and Type
    Method
    Description
    Determines whether the user in the given context belongs to this group.
    default Mono<Boolean>
    Determines whether the user in the given context belongs to this group.
    default Mono<Boolean>
    belongs(User user, AccessContext context)
    Determines whether the given user belongs to this group in the context of the given guild and channel.

    Methods inherited from interface dev.sympho.modular_commands.api.permission.Group

    belongs
  • Method Details

    • belongs

      Determines whether the user in the given context belongs to this group.
      Parameters:
      context - The access context being checked.
      Returns:
      A Mono that issues true if the user belongs to this group under the context, or false otherwise.
      Implementation Requirements:
      Implementations should prefer using the monos provided by the context directly instead of obtaining them through other means (such as through the client), as the context is optimized when possible to reuse existing instances instead of issuing new API calls.
    • belongs

      default Mono<Boolean> belongs(ChannelAccessContext context)
      Description copied from interface: Group
      Determines whether the user in the given context belongs to this group.
      Specified by:
      belongs in interface Group
      Parameters:
      context - The access context being checked.
      Returns:
      A Mono that issues true if the user belongs to this group under the context, or false otherwise.
      Implementation Requirements:
      Delegates to belongs(AccessContext).
    • belongs

      @SideEffectFree default Mono<Boolean> belongs(User user, AccessContext context)
      Determines whether the given user belongs to this group in the context of the given guild and channel.
      Parameters:
      user - The user to check for.
      context - The access context being checked.
      Returns:
      A Mono that issues true if the user belongs to this group under the given context, or false otherwise.
      API Note:
      This is equivalent to using AccessContext.asUser(User) and delegating to belongs(AccessContext). The user in the given context is ignored.