TextCommand

interface TextCommand : Command

Abstract text command representation.

Functions

Link copied to clipboard
open fun <T : CommandEvent<*>> addExecution(argTypes: List<Argument<*, *>>, execute: suspend T.() -> Unit)

Add an Execution to this Command. Called automatically by each execute block. You should not need to call this manually.

Link copied to clipboard
open suspend fun canParse(    context: DiscordContext,     execution: Execution<*>,     args: List<String>): Boolean

Whether the command can parse the given arguments into a container.

Link copied to clipboard
open suspend fun hasPermissionToRun(    discord: Discord,     author: User,     guild: Guild?): Boolean

Whether this command has permission to run with the given event.

Link copied to clipboard
open fun invoke(event: CommandEvent<TypeContainer>, args: List<String>)

Invoke this command with the given args.

Properties

Link copied to clipboard
abstract val category: String

The category that this command belongs to - set automatically by CommandSet.

Link copied to clipboard
abstract var description: String

A brief description of the command - used in documentation.

Link copied to clipboard
abstract val executions: MutableList<Execution<CommandEvent<*>>>

The list of Execution that this command can be run with.

Link copied to clipboard
open override val name: String

The first provided name for a TextCommand.

Link copied to clipboard
open val names: List<String>

All names (aliases) of this command.

Link copied to clipboard
abstract var requiredPermissions: Permissions

The permission level required to use this command.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard