c

ackcord.interactions.commands

SlashCommandBuilder

class SlashCommandBuilder[Interaction[_], A] extends CommandBuilder[Interaction, A]

A slash command builder.

Source
SlashCommandBuilder.scala
Linear Supertypes
CommandBuilder[Interaction, A], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SlashCommandBuilder
  2. CommandBuilder
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SlashCommandBuilder(defaultPermission: Boolean, transformer: DataInteractionTransformer[CommandInteraction, Interaction], implParamList: Either[=:=[NotUsed, A], ParamList[A]], extra: Map[String, String])

Value Members

  1. def andThen[To2[_]](nextTransformer: DataInteractionTransformer[Interaction, To2]): SlashCommandBuilder[To2, A]

    Use a new transformer on the current transformer.

    Use a new transformer on the current transformer.

    Definition Classes
    SlashCommandBuilderCommandBuilder
  2. def command(name: String, description: String)(handle: (Interaction[A]) => InteractionResponse): SlashCommand[Interaction, A]

    Create a slash command.

    Create a slash command.

    name

    Name of the slash command.

    description

    Description of the slash command.

    handle

    A handler for the slash command.

  3. def defaultPermission(permission: Boolean): SlashCommandBuilder[Interaction, A]
    Definition Classes
    SlashCommandBuilderCommandBuilder
  4. val defaultPermission: Boolean
    Definition Classes
    SlashCommandBuilderCommandBuilder
  5. val extra: Map[String, String]

    Extra info to associate with the command.

    Extra info to associate with the command.

    Definition Classes
    SlashCommandBuilderCommandBuilder
  6. def group(name: String, description: String)(subcommands: SlashCommandOrGroup*): SlashCommandGroup

    Create a slash command group.

    Create a slash command group.

    name

    Name of the group

    description

    Description of the group.

    subcommands

    Subcommands of the group.

  7. def named(name: String, description: String): NamedSlashCommandBuilder[Interaction, A]

    Sets the name and description of the created slash command.

  8. def paramList: Option[ParamList[A]]

    The parameter list of this command.

  9. val transformer: DataInteractionTransformer[CommandInteraction, Interaction]

    A transformer to do base processing of the interaction before handling it.

    A transformer to do base processing of the interaction before handling it.

    Definition Classes
    SlashCommandBuilderCommandBuilder
  10. def withExtra(extra: Map[String, String]): SlashCommandBuilder[Interaction, A]

    Sets the extra info associated with the command.

    Sets the extra info associated with the command.

    Definition Classes
    SlashCommandBuilderCommandBuilder
  11. def withNoParams: SlashCommandBuilder[Interaction, NotUsed]

    Removes the parameters of the command builder.

  12. def withParams[NewA](paramList: ParamList[NewA]): SlashCommandBuilder[Interaction, NewA]

    Sets the parameters to use for this command.

  13. def withTransformer[NewTo[_]](transformer: DataInteractionTransformer[CommandInteraction, NewTo]): SlashCommandBuilder[NewTo, A]

    Sets the transformer to process the interaction first.

    Sets the transformer to process the interaction first.

    Definition Classes
    SlashCommandBuilderCommandBuilder