c

ackcord.commands

NamedCommandBuilder

case class NamedCommandBuilder[+M[_], A](requests: requests.Requests, defaultMustMention: Boolean, defaultMentionOrPrefix: Boolean, prefixParser: StructuredPrefixParser, 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.

prefixParser

The prefix parser to use for commands created from this builder.

parser

The parser used for parsing the arguments this command takes.

Source
commandBuilder.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NamedCommandBuilder
  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 NamedCommandBuilder(builder: CommandBuilder[M, A], prefixParser: StructuredPrefixParser)
  2. new NamedCommandBuilder(requests: requests.Requests, defaultMustMention: Boolean, defaultMentionOrPrefix: Boolean, prefixParser: StructuredPrefixParser, 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.

    prefixParser

    The prefix parser to use for commands created from this builder.

    parser

    The parser used for parsing the arguments this command takes.

Type Members

  1. type Action[B, Mat] = NamedComplexCommand[B, Mat]
    Definition Classes
    NamedCommandBuilderActionBuilder

Value Members

  1. val actionFunction: ActionFunction[CommandMessage, M, CommandError]
  2. def andThen[M2[_]](f: CommandFunction[M, M2]): NamedCommandBuilder[M2, A]

    Chains first this function, and then another one.

    Chains first this function, and then another one.

    Definition Classes
    NamedCommandBuilderActionFunction
  3. 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
  4. 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
  5. 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
  6. val defaultMentionOrPrefix: Boolean
  7. val defaultMustMention: Boolean
  8. def described(name: String, description: String, usage: String = "", extra: Map[String, String] = Map.empty): NamedDescribedCommandBuilder[M, A]

    Adds a description to this builder

  9. def described(description: CommandDescription): NamedDescribedCommandBuilder[M, A]

    Adds a description to this builder

  10. 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
    NamedCommandBuilderActionFunction
  11. val parser: MessageParser[A]
  12. def parsing[B](implicit newParser: MessageParser[B]): NamedCommandBuilder[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

  13. val prefixParser: StructuredPrefixParser
  14. def productElementNames: Iterator[String]
    Definition Classes
    Product
  15. val requests: requests.Requests

    A request helper that belongs to this builder.

    A request helper that belongs to this builder.

    Definition Classes
    NamedCommandBuilderActionBuilder
  16. 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
  17. 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
  18. def toSink[Mat](sinkBlock: Sink[M[A], Mat]): NamedComplexCommand[A, Mat]

    Creates an action from a sink.

    Creates an action from a sink.

    Mat

    The materialized result of running this action.

    sinkBlock

    The sink that will process this action.

    Definition Classes
    NamedCommandBuilderActionBuilder
  19. 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
  20. 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
  21. 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