Class UserArgument<C>

  • Type Parameters:
    C - Command sender type
    All Implemented Interfaces:
    java.lang.Comparable<cloud.commandframework.arguments.CommandArgument<?,​?>>

    public final class UserArgument<C>
    extends cloud.commandframework.arguments.CommandArgument<C,​net.dv8tion.jda.api.entities.User>
    Command Argument for User
    • Method Summary

      Modifier and Type Method Description
      @NotNull java.util.List<UserArgument.ParserMode> getModes()
      Get the modes enabled on the parser
      static <C> @NonNull UserArgument.Builder<C> newBuilder​(@NonNull java.lang.String name)
      Create a new builder
      static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,​net.dv8tion.jda.api.entities.User> of​(@NonNull java.lang.String name)
      Create a new required command component
      static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,​net.dv8tion.jda.api.entities.User> optional​(@NonNull java.lang.String name)
      Create a new optional command component
      • Methods inherited from class cloud.commandframework.arguments.CommandArgument

        addPreprocessor, compareTo, copy, equals, getDefaultValue, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • newBuilder

        public static <C> @NonNull UserArgument.Builder<C> newBuilder​(@NonNull java.lang.String name)
        Create a new builder
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Name of the component
        Returns:
        Created builder
      • of

        public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,​net.dv8tion.jda.api.entities.User> of​(@NonNull java.lang.String name)
        Create a new required command component
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Component name
        Returns:
        Created component
      • optional

        public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,​net.dv8tion.jda.api.entities.User> optional​(@NonNull java.lang.String name)
        Create a new optional command component
        Type Parameters:
        C - Command sender type
        Parameters:
        name - Component name
        Returns:
        Created component
      • getModes

        @NotNull
        public @NotNull java.util.List<UserArgument.ParserMode> getModes()
        Get the modes enabled on the parser
        Returns:
        List of Modes