Record Class CommandImpl<H extends Handlers>

java.lang.Object
java.lang.Record
dev.sympho.modular_commands.impl.CommandImpl<H>
Type Parameters:
H - The handler type.
Record Components:
scope - The scope that the command is defined in.
callable - If the command may be directly invoked by users.
parent - The parent of the command.
name - The name of the command.
aliases - The aliases that may also invoke the command.
displayName - The display name of the command.
description - The description of the command.
parameters - The command parameters, in the order that they should be provided by the user.
requiredGroup - The group that a user must have access for in order to invoke this command.
skipGroupCheckOnInteraction - Whether group access checking should be skipped.
requireParentGroups - Whether a user invoking this command must also have access to the groups necessary to invoke its parent command(s).
nsfw - Whether this command can only be invoked in a NSFW channel.
privateReply - Whether this command's response is sent in a way that only the invoking user can see.
ephemeralReply - The type of ephemeral response to use, if any.
inheritSettings - Whether the command settings should be inherited from the parent command (ignoring the values provided by this command).
invokeParent - Whether to invoke the parent as part of normal execution.
handlers - The handler to use for processing an invocation of the command.
All Implemented Interfaces:
Command<H>

public record CommandImpl<H extends Handlers>(Command.Scope scope, boolean callable, Invocation parent, @MatchesRegex("(?U)^[-_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}+$") String name, Set<@MatchesRegex("(?U)^[-_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}+$") String> aliases, @MatchesRegex("(?U)^[ -_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}+$") String displayName, @MatchesRegex("(?Us)^.{1,100}+$") String description, List<Parameter<?>> parameters, Group requiredGroup, boolean skipGroupCheckOnInteraction, boolean requireParentGroups, boolean nsfw, boolean privateReply, ReplyManager.EphemeralType ephemeralReply, boolean inheritSettings, boolean invokeParent, H extends Handlers handlers) extends Record implements Command<H>
Default implementation of an interaction-based command.
Since:
1.0
Version:
1.0
  • Constructor Details

    • CommandImpl

      @SideEffectFree public CommandImpl(Command.Scope scope, boolean callable, Invocation parent, @MatchesRegex("(?U)^[-_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}+$") String name, Set<@MatchesRegex("(?U)^[-_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}+$") String> aliases, @MatchesRegex("(?U)^[ -_\\p{L}\\p{N}\\p{sc=Deva}\\p{sc=Thai}]{1,32}+$") String displayName, @MatchesRegex("(?Us)^.{1,100}+$") String description, List<Parameter<?>> parameters, Group requiredGroup, boolean skipGroupCheckOnInteraction, boolean requireParentGroups, boolean nsfw, boolean privateReply, ReplyManager.EphemeralType ephemeralReply, boolean inheritSettings, boolean invokeParent, H handlers)
      Initializes a new instance.
      Parameters:
      scope - The scope that the command is defined in.
      callable - If the command may be directly invoked by users.
      parent - The parent of the command.
      name - The name of the command.
      aliases - The aliases that may also invoke the command.
      displayName - The display name of the command.
      description - The description of the command.
      parameters - The command parameters, in the order that they should be provided by the user.
      requiredGroup - The group that a user must have access for in order to invoke this command.
      skipGroupCheckOnInteraction - Whether group access checking should be skipped.
      requireParentGroups - Whether a user invoking this command must also have access to the groups necessary to invoke its parent command(s).
      nsfw - Whether this command can only be invoked in a NSFW channel.
      privateReply - Whether this command's response is sent in a way that only the invoking user can see.
      ephemeralReply - The type of ephemeral response to use, if any.
      inheritSettings - Whether the command settings should be inherited from the parent command (ignoring the values provided by this command).
      invokeParent - Whether to invoke the parent as part of normal execution.
      handlers - The handler to use for processing an invocation of the command.
  • Method Details