Class SlashCommandEvent

    • Method Detail

      • 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.
      • 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.