All Known Subinterfaces:
NamedGroup
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 Group
Specifies a group that users may belong to.

Note that group membership is not static, but rather may change between guilds and/or channels. This allows the definition of flexible permission groups that refer to different groups of people in different servers/channels.

Since:
1.0
Version:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    belongs(Mono<Guild> guild, Mono<MessageChannel> channel, User user)
    Determines whether the given user belongs to this group in the context of the given guild and channel.
  • Method Details

    • belongs

      @SideEffectFree Mono<Boolean> belongs(Mono<Guild> guild, Mono<MessageChannel> channel, User user)
      Determines whether the given user belongs to this group in the context of the given guild and channel.
      Parameters:
      guild - The guild in which group membership is being checked for. It may be empty in the case of a private channel.
      channel - The channel in which group membership is being checked for.
      user - The user to check group membership for.
      Returns:
      A Mono that issues true if the user belongs to this group under the given guild and channel, or false otherwise.