object MessageParser extends MessageParserInstances with DeriveMessageParser

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MessageParser
  2. DeriveMessageParser
  3. MessageParserInstances
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class RemainingAsString(remaining: String) extends Product with Serializable

Value Members

  1. object Auto
    Definition Classes
    DeriveMessageParser
  2. val allStringsParser: MessageParser[List[String]]

    A parser that will return all the strings passed to it.

    A parser that will return all the strings passed to it.

    Definition Classes
    MessageParserInstances
  3. def apply[A](implicit parser: MessageParser[A]): MessageParser[A]
  4. implicit val booleanParser: MessageParser[Boolean]
    Definition Classes
    MessageParserInstances
  5. implicit val byteParser: MessageParser[Byte]
    Definition Classes
    MessageParserInstances
  6. implicit val cNilParser: MessageParser[CNil]
    Definition Classes
    DeriveMessageParser
  7. implicit val channelParser: MessageParser[Channel]
    Definition Classes
    MessageParserInstances
  8. val channelRegex: Regex
    Definition Classes
    MessageParserInstances
  9. implicit def coProductParser[Head, Tail <: Coproduct](implicit headParser: Lazy[MessageParser[Head]], tailParser: Lazy[MessageParser[Tail]]): MessageParser[:+:[Head, Tail]]
    Definition Classes
    DeriveMessageParser
  10. implicit val doubleParser: MessageParser[Double]
    Definition Classes
    MessageParserInstances
  11. implicit val emojiParser: MessageParser[Emoji]
    Definition Classes
    MessageParserInstances
  12. val emojiRegex: Regex
    Definition Classes
    MessageParserInstances
  13. def fail[A](e: String): MessageParser[A]

    A message parser that always fails.

    A message parser that always fails.

    e

    The error to return

    Definition Classes
    MessageParserInstances
  14. implicit val floatParser: MessageParser[Float]
    Definition Classes
    MessageParserInstances
  15. def fromEither[A](f: (String) => Either[String, A]): MessageParser[A]

    Parse a string into a try, where the left contains the error message

    Parse a string into a try, where the left contains the error message

    A

    The type to parse

    f

    The function to transform the string with.

    Definition Classes
    MessageParserInstances
  16. def fromString[A](f: (String) => A): MessageParser[A]

    Create a parser from a string

    Create a parser from a string

    A

    The type to parse

    f

    The function to transform the string with

    Definition Classes
    MessageParserInstances
  17. def fromTry[A](f: (String) => Try[A]): MessageParser[A]

    Parse a string with a try

    Parse a string with a try

    A

    The type to parse

    f

    The function to transform the string with.

    Definition Classes
    MessageParserInstances
  18. implicit val guildChannelParser: MessageParser[GuildChannel]
    Definition Classes
    MessageParserInstances
  19. implicit def hListParser[Head, Tail <: HList](implicit headParser: Lazy[MessageParser[Head]], tailParser: Lazy[MessageParser[Tail]]): MessageParser[::[Head, Tail]]
    Definition Classes
    DeriveMessageParser
  20. implicit lazy val hNilParser: MessageParser[HNil]
    Definition Classes
    DeriveMessageParser
  21. implicit val intParser: MessageParser[Int]
    Definition Classes
    MessageParserInstances
  22. def literal(lit: String, caseSensitive: Boolean = true): MessageParser[String]

    Matches a literal string

    Matches a literal string

    lit

    The string to match

    caseSensitive

    If the match should be case insensitive

    Definition Classes
    MessageParserInstances
  23. implicit val longParser: MessageParser[Long]
    Definition Classes
    MessageParserInstances
  24. implicit val messageParserMonad: MonadError[MessageParser, String]
  25. implicit val notUsedParser: MessageParser[NotUsed]

    A parser that will only succeed if there are no strings left.

    A parser that will only succeed if there are no strings left.

    Definition Classes
    MessageParserInstances
  26. def oneOf[A](seq: Seq[MessageParser[A]]): MessageParser[A]

    Matches one of the parsers passed in

    Matches one of the parsers passed in

    seq

    The parsers to try

    Definition Classes
    MessageParserInstances
  27. implicit def optional[A](implicit parser: MessageParser[A]): MessageParser[Option[A]]
    Definition Classes
    MessageParserInstances
  28. def orElseWith[A, B, C](parse1: MessageParser[A], parse2: MessageParser[B])(combine: (Either[A, B]) => C): MessageParser[C]
    Definition Classes
    MessageParserInstances
  29. def parseEither[A](args: List[String], parser: MessageParser[A])(implicit c: CacheSnapshot): Either[String, (List[String], A)]
  30. def parseResultEither[A](args: List[String], parser: MessageParser[A])(implicit c: CacheSnapshot): Either[String, A]

    Parse a message as an type

    Parse a message as an type

    A

    The type to parse the message as

    args

    The message to parse

    parser

    The parser to use

    c

    The cache to use

    returns

    Left with an error message if it failed to parse, or Right with the parsed type

  31. implicit def remaining2String(remaining: RemainingAsString): String
  32. implicit val remainingStringParser: MessageParser[RemainingAsString]
    Definition Classes
    MessageParserInstances
  33. implicit val roleParser: MessageParser[Role]
    Definition Classes
    MessageParserInstances
  34. val roleRegex: Regex
    Definition Classes
    MessageParserInstances
  35. implicit val shortParser: MessageParser[Short]
    Definition Classes
    MessageParserInstances
  36. def startsWith(prefix: String, caseSensitive: Boolean = true, consumeAll: Boolean = false): MessageParser[String]

    Matches a string that starts with a prefix

    Matches a string that starts with a prefix

    prefix

    The prefix to look for

    caseSensitive

    If the matching should be case sensitive

    consumeAll

    If the whole string should be consumed if only part of it was matched

    Definition Classes
    MessageParserInstances
  37. implicit val stringParser: MessageParser[String]
    Definition Classes
    MessageParserInstances
  38. implicit val textChannelParser: MessageParser[TextChannel]
    Definition Classes
    MessageParserInstances
  39. implicit val textGuildChannelParser: MessageParser[TextGuildChannel]
    Definition Classes
    MessageParserInstances
  40. def unit: MessageParser[Unit]
    Definition Classes
    MessageParserInstances
  41. implicit val userParser: MessageParser[User]
    Definition Classes
    MessageParserInstances
  42. val userRegex: Regex
    Definition Classes
    MessageParserInstances
  43. def withTry[A](f: (String) => A): MessageParser[A]

    Parse a string with a function that can throw

    Parse a string with a function that can throw

    A

    The type to parse

    f

    The function to transform the string with. This can throw an exception

    Definition Classes
    MessageParserInstances
  44. def withTryCustomError[A](errorMessage: (String) => String)(f: (String) => A): MessageParser[A]

    Same as withTry but with a custom error.

    Same as withTry but with a custom error.

    A

    The type to parse

    errorMessage

    The error message to use

    f

    The function to transform the string with.

    Definition Classes
    MessageParserInstances