Package

ackcord

commands

Permalink

package commands

Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractCmdInfo[F[_]] extends CmdRefiner[F]

    Permalink

    A CmdRefiner which works on the normal structure of a command.

    A CmdRefiner which works on the normal structure of a command. A prefix at the start, then an alias. Also supports CmdFilters.

  2. trait AbstractCommandSettings[F[_]] extends AnyRef

    Permalink

    An object to control how messages are parsed into command objects.

  3. sealed trait AllCmdMessages[F[_]] extends AnyRef

    Permalink

    Top trait for all command messages.

  4. case class BaseCmdFactory[F[_], +Mat](refiner: CmdRefiner[F], sink: (RequestHelper) ⇒ Sink[Cmd[F], Mat], description: Option[CmdDescription] = None) extends CmdFactory[F, Cmd[F], Mat] with Product with Serializable

    Permalink

    The factory for an unparsed command.

    The factory for an unparsed command.

    refiner

    The refiner to use to determine if, and how commands should be accepted.

    sink

    A sink which defines the behavior of this command.

    description

    A description of this command.

  5. case class Cmd[F[_]](msg: Message, args: List[String], cache: CacheSnapshot[F]) extends CmdMessage[F] with Product with Serializable

    Permalink

    An unparsed specific command.

    An unparsed specific command.

    msg

    The message of this command.

    args

    The args for this command.

    cache

    The cache for this command.

  6. case class CmdDescription(name: String, description: String, usage: String = "", extra: Map[String, String] = Map.empty) extends Product with Serializable

    Permalink

    Represents non essential information about a command intended to be displayed to an end user.

    Represents non essential information about a command intended to be displayed to an end user.

    name

    The display name of a command.

    description

    The description of what a command does.

    usage

    How to use the command. Does not include the name or prefix.

    extra

    Extra stuff about the command that you yourself decide on.

  7. sealed trait CmdError[F[_]] extends AllCmdMessages[F]

    Permalink

    Trait for all command errors.

  8. sealed trait CmdFactory[F[_], A, +Mat] extends AnyRef

    Permalink

    A factory for a command, that also includes other information about the command.

  9. trait CmdFilter extends AnyRef

    Permalink

    A command filter is something used to limit the scope in which a command can be used.

    A command filter is something used to limit the scope in which a command can be used. A few filters are defined here, but creating a custom one is easy.

  10. class CmdFlow[F[_]] extends CmdFlowBase[Cmd[F], F]

    Permalink

    An object to extract the cache from a unparsed cmd object.

  11. trait CmdFlowBase[A, F[_]] extends AnyRef

    Permalink
  12. case class CmdInfo[F[_]](prefix: String, aliases: Seq[String], filters: Seq[CmdFilter] = Seq.empty, filterBehavior: FilterBehavior = FilterBehavior.SendAll)(implicit evidence$2: Monad[F]) extends AbstractCmdInfo[F] with Product with Serializable

    Permalink

    A CmdRefiner that can be used when the prefix, aliases, and filters for a command are known in advance.

    A CmdRefiner that can be used when the prefix, aliases, and filters for a command are known in advance.

    prefix

    The prefix to use for the command.

    aliases

    The aliases to use for the command.

    filters

    The filters to use for the command.

  13. sealed trait CmdMessage[F[_]] extends AllCmdMessages[F]

    Permalink

    Trait for all unparsed command messages.

  14. case class CmdParseError[F[_]](msg: Message, error: String, cache: CacheSnapshot[F]) extends ParsedCmdMessage[F, Nothing] with CmdError[F] with Product with Serializable

    Permalink

    A parse error for a parsed command.

    A parse error for a parsed command.

    msg

    The message of this command.

    error

    The error message.

    cache

    The cache for this command.

  15. trait CmdRefiner[F[_]] extends AnyRef

    Permalink

    An object used to refine RawCmd into Cmd, or return errors instead.

  16. case class CommandSettings[F[_]](needsMention: Boolean, prefixes: Set[String])(implicit evidence$1: Applicative[F]) extends AbstractCommandSettings[F] with Product with Serializable

    Permalink

    A simple AbstractCommandSettings that can be used when you know in advance if commands need a mention at the start, and what prefixes are valid.

    A simple AbstractCommandSettings that can be used when you know in advance if commands need a mention at the start, and what prefixes are valid.

    needsMention

    If a mention should always be required.

    prefixes

    All the valid prefixes for commands.

  17. case class Commands[F[_]](subscribeRaw: Source[RawCmdMessage[F], NotUsed], requests: RequestHelper) extends Product with Serializable

    Permalink

    Represents a command handler, which will try to parse commands.

    Represents a command handler, which will try to parse commands.

    subscribeRaw

    A source that represents the parsed commands. Can be materialized as many times as needed.

    requests

    A request helper object which will be passed to handlers.

  18. sealed trait Context extends AnyRef

    Permalink

    Represents a place a command can be used.

  19. trait DeriveMessageParser extends AnyRef

    Permalink
  20. sealed trait FilterBehavior extends AnyRef

    Permalink
  21. case class FilteredCmd[F[_]](failedFilters: Seq[CmdFilter], cmd: RawCmd[F]) extends CmdMessage[F] with ParsedCmdMessage[F, Nothing] with CmdError[F] with Product with Serializable

    Permalink

    A command that did not make it through some filters.

    A command that did not make it through some filters.

    failedFilters

    The filters the command failed.

    cmd

    The raw command object.

  22. case class GenericCmdError[F[_]](error: String, cmd: RawCmd[F]) extends CmdMessage[F] with ParsedCmdMessage[F, Nothing] with CmdError[F] with Product with Serializable

    Permalink

    A generic command error.

    A generic command error.

    error

    The error message.

    cmd

    The raw command object.

  23. trait MessageParser[A] extends AnyRef

    Permalink

    MessageParser is a typeclass to simplify parsing messages.

    MessageParser is a typeclass to simplify parsing messages. It can derive instances for any ADT, and makes it much easier to work with messages.

    A

    The type to parse.

  24. trait MessageParserInstances extends AnyRef

    Permalink
  25. case class NoCmd[F[_]](msg: Message, c: CacheSnapshot[F]) extends RawCmdMessage[F] with CmdError[F] with Product with Serializable

    Permalink

    Bot was mentioned, but no command was used.

  26. case class NoCmdPrefix[F[_]](msg: Message, command: String, args: List[String], c: CacheSnapshot[F]) extends RawCmdMessage[F] with CmdError[F] with Product with Serializable

    Permalink

    An unknown prefix was used.

  27. case class ParsedCmd[F[_], A](msg: Message, args: A, remaining: List[String], cache: CacheSnapshot[F]) extends ParsedCmdMessage[F, A] with Product with Serializable

    Permalink

    A parsed specific command.

    A parsed specific command.

    msg

    The message of this command.

    args

    The args for this command.

    remaining

    The remaining arguments after the parser did it's thing.

    cache

    The cache for this command.

  28. case class ParsedCmdFactory[F[_], A, +Mat](refiner: CmdRefiner[F], sink: (RequestHelper) ⇒ Sink[ParsedCmd[F, A], Mat], description: Option[CmdDescription] = None)(implicit parser: MessageParser[A]) extends CmdFactory[F, ParsedCmd[F, A], Mat] with Product with Serializable

    Permalink

    The factory for a parsed command.

    The factory for a parsed command.

    refiner

    The refiner to use to determine if, and how commands should be accepted.

    sink

    A sink which defines the behavior of this command.

    description

    A description of this command.

  29. class ParsedCmdFlow[F[_], A] extends CmdFlowBase[ParsedCmd[F, A], F]

    Permalink

    A class to extract the cache from a parsed cmd object.

  30. sealed trait ParsedCmdMessage[F[_], +A] extends AllCmdMessages[F]

    Permalink

    Trait for all parsed command messages.

  31. case class RawCmd[F[_]](msg: Message, prefix: String, cmd: String, args: List[String], c: CacheSnapshot[F]) extends RawCmdMessage[F] with Product with Serializable

    Permalink

    A raw unparsed command.

    A raw unparsed command.

    msg

    The message of this command.

    prefix

    The prefix for this command.

    cmd

    The name of this command.

    args

    The arguments of this command.

    c

    The cache for this command.

  32. sealed trait RawCmdMessage[F[_]] extends AllCmdMessages[F]

    Permalink

    Trait for commands that have not been parsed into a specific command.

Ungrouped