case class CommandBuilder[+M[_], A](requests: requests.Requests, defaultMustMention: Boolean, defaultMentionOrPrefix: Boolean, parser: MessageParser[A], actionFunction: ActionFunction[CommandMessage, M, CommandError]) extends ActionBuilder[CommandMessage, M, CommandError, A] with Product with Serializable

A CommandFunction from a command message to an output. Used for creating commands.

M

The command message type used by the command.

A

The argument type of this command builder.

defaultMustMention

Set the default value for must mention when creating a named command.

defaultMentionOrPrefix

Set the default value for mention or prefix when creating a named command.

parser

The parser used for parsing the arguments this command takes.

Self Type
CommandBuilder[M, A]
Source
commandBuilder.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CommandBuilder
  2. Serializable
  3. Product
  4. Equals
  5. ActionBuilder
  6. ActionFunction
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CommandBuilder(requests: requests.Requests, defaultMustMention: Boolean, defaultMentionOrPrefix: Boolean, parser: MessageParser[A], actionFunction: ActionFunction[CommandMessage, M, CommandError])

    defaultMustMention

    Set the default value for must mention when creating a named command.

    defaultMentionOrPrefix

    Set the default value for mention or prefix when creating a named command.

    parser

    The parser used for parsing the arguments this command takes.

Type Members

  1. type Action[B, Mat] = ComplexCommand[B, Mat]
    Definition Classes
    CommandBuilderActionBuilder

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val actionFunction: ActionFunction[CommandMessage, M, CommandError]
  5. def andThen[M2[_]](f: CommandFunction[M, M2]): CommandBuilder[M2, A]

    Chains first this function, and then another one.

    Chains first this function, and then another one.

    Definition Classes
    CommandBuilderActionFunction
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def async(block: (M[A]) => Future[Unit]): Action[A, NotUsed]

    Creates an action that results in an async result

    Creates an action that results in an async result

    block

    The execution of the action.

    Definition Classes
    ActionBuilder
  8. def asyncOpt(block: (M[A]) => OptFuture[Unit]): Action[A, NotUsed]

    Creates an action that results in an partial async result

    Creates an action that results in an partial async result

    block

    The execution of the action.

    Definition Classes
    ActionBuilder
  9. def asyncOptRequest[G[_]](block: (M[A]) => OptFuture[Request[Any]]): Action[A, NotUsed]

    Creates an async action that might do a single request

    Creates an async action that might do a single request

    G

    The streamable result type.

    block

    The execution of the action.

    Definition Classes
    ActionBuilder
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  11. val defaultMentionOrPrefix: Boolean
  12. val defaultMustMention: Boolean
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def flow[C]: Flow[CommandMessage[C], Either[Option[CommandError], M[C]], NotUsed]

    A flow that represents this mapping.

    A flow that represents this mapping.

    Definition Classes
    CommandBuilderActionFunction
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def named(namedSymbols: Seq[String], namedAliases: Seq[String], mustMention: Boolean = defaultMustMention, aliasesCaseSensitive: Boolean = false, mentionOrPrefix: Boolean = defaultMentionOrPrefix): NamedCommandBuilder[M, A]

    Converts this builder into a builder that will create NamedComplexCommand.

    Converts this builder into a builder that will create NamedComplexCommand. These don't need to be provided a name when registering them.

    namedSymbols

    The symbols to use when invoking the command

    namedAliases

    The valid aliases to use when invoking the command

    mustMention

    If the command requires a mention

    aliasesCaseSensitive

    If the command aliases should be matched with case sensitivity

    mentionOrPrefix

    If true allows one to use a mention in place of a prefix. If needsMention is also true, skips the symbol check.

  18. def namedAsync(namedSymbols: (CacheSnapshot, Message) => Future[Seq[String]], namedAliases: (CacheSnapshot, Message) => Future[Seq[String]], mustMention: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(defaultMustMention), aliasesCaseSensitive: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(false), canExecute: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(true), mentionOrPrefix: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(defaultMentionOrPrefix)): NamedCommandBuilder[M, A]

    Converts this builder into a builder that will create NamedComplexCommand.

    Converts this builder into a builder that will create NamedComplexCommand. These don't need to be provided a name when registering them.

    namedSymbols

    The symbols to use when invoking the command

    namedAliases

    The valid aliases to use when invoking the command

    mustMention

    If the command requires a mention

    aliasesCaseSensitive

    If the command aliases should be matched with case sensitivity

    canExecute

    A early precheck if the command can execute at all

    mentionOrPrefix

    If true allows one to use a mention in place of a prefix. If needsMention is also true, skips the symbol check.

  19. def namedFunction(namedSymbols: (CacheSnapshot, Message) => Seq[String], namedAliases: (CacheSnapshot, Message) => Seq[String], mustMention: (CacheSnapshot, Message) => Boolean = (_, _) => defaultMustMention, aliasesCaseSensitive: (CacheSnapshot, Message) => Boolean = (_, _) => false, canExecute: (CacheSnapshot, Message) => Boolean = (_, _) => true, mentionOrPrefix: (CacheSnapshot, Message) => Boolean = (_, _) => defaultMentionOrPrefix): NamedCommandBuilder[M, A]

    Converts this builder into a builder that will create NamedComplexCommand.

    Converts this builder into a builder that will create NamedComplexCommand. These don't need to be provided a name when registering them.

    namedSymbols

    The symbols to use when invoking the command

    namedAliases

    The valid aliases to use when invoking the command

    mustMention

    If the command requires a mention

    aliasesCaseSensitive

    If the command aliases should be matched with case sensitivity

    canExecute

    A early precheck if the command can execute at all

    mentionOrPrefix

    If true allows one to use a mention in place of a prefix. If needsMention is also true, skips the symbol check.

  20. def namedParser(structuredPrefixParser: StructuredPrefixParser): NamedCommandBuilder[M, A]

    Converts this builder into a builder that will create NamedComplexCommand.

    Converts this builder into a builder that will create NamedComplexCommand. These don't need to be provided a name when registering them.

    structuredPrefixParser

    The structured prefix parser to use as a name for commands created by this builder.

  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  24. val parser: MessageParser[A]
  25. def parsing[B](implicit newParser: MessageParser[B]): CommandBuilder[M, B]

    Creates a new command builder parsing a specific type.

    Creates a new command builder parsing a specific type.

    B

    The type to parse

  26. def productElementNames: Iterator[String]
    Definition Classes
    Product
  27. val requests: requests.Requests

    A request helper that belongs to this builder.

    A request helper that belongs to this builder.

    Definition Classes
    CommandBuilderActionBuilder
  28. def streamed[G[_]](block: (M[A]) => G[Unit])(implicit streamable: util.Streamable[G]): Action[A, NotUsed]

    Creates an action that results in some streamable type G

    Creates an action that results in some streamable type G

    G

    The streamable result type.

    block

    The execution of the action.

    Definition Classes
    ActionBuilder
  29. def streamedOptRequest[G[_]](block: (M[A]) => OptionT[G, Request[Any]])(implicit streamable: util.Streamable[G]): Action[A, NotUsed]

    Creates an action that might do a single request, wrapped in an effect type G

    Creates an action that might do a single request, wrapped in an effect type G

    G

    The streamable result type.

    block

    The execution of the action.

    Definition Classes
    ActionBuilder
  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. def toSink[Mat](sinkBlock: Sink[M[A], Mat]): ComplexCommand[A, Mat]

    Creates a command from a sink.

    Creates a command from a sink.

    Mat

    The materialized result of running this command.

    sinkBlock

    The sink that will process this command.

    Definition Classes
    CommandBuilderActionBuilder
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. def withRequest(block: (M[A]) => Request[Any]): Action[A, NotUsed]

    Creates an action that will do a single request

    Creates an action that will do a single request

    block

    The execution of the action.

    Definition Classes
    ActionBuilder
  36. def withRequestOpt(block: (M[A]) => Option[Request[Any]]): Action[A, NotUsed]

    Creates an action that might do a single request

    Creates an action that might do a single request

    block

    The execution of the action.

    Definition Classes
    ActionBuilder
  37. def withSideEffects(block: (M[A]) => Unit): Action[A, NotUsed]

    Creates an action that might execute unknown side effects.

    Creates an action that might execute unknown side effects.

    block

    The execution of the action.

    Definition Classes
    ActionBuilder

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped