Class ChatInputAutoCompleteEvent

    • Method Detail

      • respondWithSuggestions

        public Mono<Void> respondWithSuggestions​(Iterable<discord4j.discordjson.json.ApplicationCommandOptionChoiceData> choices)
        Requests to respond to the interaction with a list of suggested choices.
        Parameters:
        choices - The list of suggested choices.
        Returns:
        A Mono where, upon successful completion, emits nothing; indicating the interaction response has been sent. If an error is received, it is emitted through the Mono.
      • getCommandId

        public Snowflake getCommandId()
        Gets the ID of the invoked command.
        Returns:
        The ID of the invoked command.
      • getCommandName

        public String getCommandName()
        Gets the name of the invoked command.
        Returns:
        The name of the invoked command.
      • getCommandType

        public ApplicationCommand.Type getCommandType()
        Gets the type of the invoked command.
        Returns:
        The type of the invoked command.
      • getOption

        public Optional<ApplicationCommandInteractionOption> getOption​(String name)
        Gets the option corresponding to the provided name, if present.
        Parameters:
        name - The name of the option.
        Returns:
        The option corresponding to the provided name, if present.
      • getFocusedOption

        public ApplicationCommandInteractionOption getFocusedOption()
        Gets the currently focused option for auto-complete.
        Returns:
        The currently focused option for auto-complete.