Class Command.Builder<H extends @NonNull Handlers>

java.lang.Object
dev.sympho.modular_commands.api.command.ImmutableCommand.Builder<H>
dev.sympho.modular_commands.api.command.Command.Builder<H>
Type Parameters:
H - The handler type.
Enclosing interface:
Command<H extends @NonNull Handlers>

public static class Command.Builder<H extends @NonNull Handlers> extends dev.sympho.modular_commands.api.command.ImmutableCommand.Builder<H>
The default builder.
Since:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    parent(Command<?> parent)
    Initializes the value for the parent attribute.

    Methods inherited from class dev.sympho.modular_commands.api.command.ImmutableCommand.Builder

    addAliases, addAliases, addAllAliases, addAllParameters, addParameters, addParameters, aliases, build, callable, deferReply, description, displayName, from, handlers, id, inheritSettings, invokeParent, name, nsfw, parameters, parent, repliesDefaultPrivate, requiredGroup, requireParentGroups, scope, skipGroupCheckOnInteraction

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • parent

      public final Command.Builder<H> parent(Command<?> parent)
      Initializes the value for the parent attribute.

      If not set, this attribute will have a default value as returned by the initializer of parent.

      Parameters:
      parent - The parent command.
      Returns:
      this builder for use in a chained invocation.
      See Also:
      API Note:
      This is a shortcut to use an existing command instance instead of having to separately maintain the parent invocation. However, note that creating entirely new instances for this may have performance implications; it is best used with an existing instance (such as the one to be registered) when possible.