package commands
- Source
- package.scala
- Alphabetic
- By Inheritance
- commands
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait ActionBuilder[-I[_], +O[_], E, A] extends ActionFunction[I, O, E]
An ActionFunction from an input to an output.
An ActionFunction from an input to an output. Used for creating actions.
- I
The input type of this builder.
- O
The action message type used by the command.
- A
The argument type of this command builder.
- trait ActionFunction[-I[_], +O[_], E] extends AnyRef
A mapping over action builders.
A mapping over action builders.
- I
The input message type
- O
The output message type
- trait ActionTransformer[-I[_], +O[_], E] extends ActionFunction[I, O, E]
An ActionFunction that can't fail, but might return a different message type.
An ActionFunction that can't fail, but might return a different message type.
- I
The input message type
- O
The output message type
- type Command[A] = ComplexCommand[A, NotUsed]
- case class CommandBuilder[+M[_], A](requests: requests.Requests, defaultMustMention: Boolean, defaultMentionOrPrefix: Boolean, 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.
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.
- parser
The parser used for parsing the arguments this command takes.
- class CommandConnector extends AnyRef
- abstract class CommandController extends AnyRef
The base command controller that you will place your commands in.
The base command controller that you will place your commands in. Contains partially applied types, and the Command builder object.
- case class CommandDescription(name: String, description: String, usage: String = "", extra: Map[String, String] = Map.empty) extends Product with Serializable
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.
- case class CommandError(error: String, channel: TextChannel, cache: CacheSnapshot) extends Product with Serializable
Represents an error encountered when executing an command.
Represents an error encountered when executing an command.
- error
The errror message
- channel
The channel the error occoured in
- cache
A cache snapshot tied to the execution of the command
- type CommandFunction[-I[_], +O[_]] = ActionFunction[I, O, CommandError]
- trait CommandMessage[+A] extends AnyRef
A message sent with an invocation of a command.
A message sent with an invocation of a command.
- A
The parsed argument type
- case class CommandRegistration[Mat](materialized: Mat, onDone: Future[Done], killSwitch: UniqueKillSwitch) extends Product with Serializable
- type CommandTransformer[-I[_], +O[_]] = ActionTransformer[I, O, CommandError]
- case class ComplexCommand[A, Mat](parser: MessageParser[A], flow: Flow[CommandMessage[A], CommandError, Mat]) extends Product with Serializable
A constructed command execution.
A constructed command execution.
- A
The argument type of the command
- Mat
The materialized result of creating this command
- trait DeriveMessageParser extends AnyRef
- trait GuildCommandMessage[+A] extends CommandMessage[A]
A message sent with the invocation of a guild command
A message sent with the invocation of a guild command
- A
The parsed argument type
- trait GuildMemberCommandMessage[+A] extends GuildCommandMessage[A] with UserCommandMessage[A]
- type GuildUserCommandMessage[+A] = GuildCommandMessage[A] with UserCommandMessage[A]
- abstract class HelpCommand extends CommandController
The basic structure for a help command.
The basic structure for a help command. Only accepts commands that use StructuredPrefixParser.
- trait MessageParser[A] extends AnyRef
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.
- trait MessageParserInstances extends AnyRef
- type NamedCommand[A] = NamedComplexCommand[A, NotUsed]
- 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.
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.
- case class NamedComplexCommand[A, Mat](command: ComplexCommand[A, Mat], prefixParser: StructuredPrefixParser) extends Product with Serializable
A constructed command execution with a name.
A constructed command execution with a name.
- A
The argument type of the command
- Mat
The materialized result of creating this command
- type NamedDescribedCommand[A] = NamedDescribedComplexCommand[A, NotUsed]
- case class NamedDescribedCommandBuilder[+M[_], A](requests: requests.Requests, defaultMustMention: Boolean, defaultMentionOrPrefix: Boolean, prefixParser: StructuredPrefixParser, description: CommandDescription, 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.
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.
- description
The description to use for commands created from this builder.
- parser
The parser used for parsing the arguments this command takes.
- case class NamedDescribedComplexCommand[A, Mat](command: ComplexCommand[A, Mat], prefixParser: StructuredPrefixParser, description: CommandDescription) extends Product with Serializable
A constructed command execution with a name and a description.
A constructed command execution with a name and a description.
- A
The argument type of the command
- Mat
The materialized result of creating this command
- trait PrefixParser extends AnyRef
- 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.
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.
- trait UserCommandMessage[+A] extends CommandMessage[A]
A message sent with the invocation of command used by a user
A message sent with the invocation of command used by a user
- A
The parsed argument type
- trait VoiceGuildCommandMessage[+A] extends GuildCommandMessage[A] with UserCommandMessage[A]
- type VoiceGuildMemberCommandMessage[+A] = GuildMemberCommandMessage[A] with VoiceGuildCommandMessage[A]
- class WrappedCommandMessage[A] extends CommandMessage[A]
Value Members
- object ActionFunction
- object ActionTransformer
- object CommandBuilder extends Serializable
- object CommandError extends Serializable
- object CommandMessage
- object CommandRegistration extends Serializable
- object GuildCommandMessage
- object GuildMemberCommandMessage
- object HelpCommand
- object MessageParser extends MessageParserInstances with DeriveMessageParser
- object PrefixParser
- object UserCommandMessage
- object VoiceGuildCommandMessage