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
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- StructuredPrefixParser
- Serializable
- Product
- Equals
- PrefixParser
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- 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
- val aliases: (CacheSnapshot, Message) => Future[Seq[String]]
- def apply(message: Message)(implicit c: CacheSnapshot, ec: ExecutionContext): Future[MessageParser[Unit]]
- Definition Classes
- StructuredPrefixParser → PrefixParser
- val canExecute: (CacheSnapshot, Message) => Future[Boolean]
- val caseSensitive: (CacheSnapshot, Message) => Future[Boolean]
- val mentionOrPrefix: (CacheSnapshot, Message) => Future[Boolean]
- val needsMention: (CacheSnapshot, Message) => Future[Boolean]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val symbols: (CacheSnapshot, Message) => Future[Seq[String]]