c

ackcord.commands

StructuredPrefixParser

case class StructuredPrefixParser(needsMention: (CacheSnapshot, Message) => Future[Boolean], symbols: (CacheSnapshot, Message) => Future[Seq[String]], aliases: (CacheSnapshot, Message) => Future[Seq[String]], caseSensitive: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(false), canExecute: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(true), mentionOrPrefix: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(true)) extends PrefixParser with Product with Serializable

Represents information about how a command can be invoked in a structural way.

needsMention

If the command needs a mention

symbols

The valid prefix symbols for the command

aliases

The aliases for the command

caseSensitive

If the aliases should be case sensitive

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.

Source
prefixParser.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StructuredPrefixParser
  2. Serializable
  3. Product
  4. Equals
  5. PrefixParser
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new StructuredPrefixParser(needsMention: (CacheSnapshot, Message) => Future[Boolean], symbols: (CacheSnapshot, Message) => Future[Seq[String]], aliases: (CacheSnapshot, Message) => Future[Seq[String]], caseSensitive: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(false), canExecute: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(true), mentionOrPrefix: (CacheSnapshot, Message) => Future[Boolean] = (_, _) => Future.successful(true))

    needsMention

    If the command needs a mention

    symbols

    The valid prefix symbols for the command

    aliases

    The aliases for the command

    caseSensitive

    If the aliases should be case sensitive

    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.

Value Members

  1. val aliases: (CacheSnapshot, Message) => Future[Seq[String]]
  2. def apply(message: Message)(implicit c: CacheSnapshot, ec: ExecutionContext): Future[MessageParser[Unit]]
    Definition Classes
    StructuredPrefixParserPrefixParser
  3. val canExecute: (CacheSnapshot, Message) => Future[Boolean]
  4. val caseSensitive: (CacheSnapshot, Message) => Future[Boolean]
  5. val mentionOrPrefix: (CacheSnapshot, Message) => Future[Boolean]
  6. val needsMention: (CacheSnapshot, Message) => Future[Boolean]
  7. def productElementNames: Iterator[String]
    Definition Classes
    Product
  8. val symbols: (CacheSnapshot, Message) => Future[Seq[String]]