DefaultSlashCommandClient

class DefaultSlashCommandClient : SlashCommandClient

Extendable coroutine based SlashCommandClient

See also

Parameters

packageName

The package name where commands are located (me.example.commands)

Functions

addCheck
Link copied to clipboard
fun addCheck(check: CommandExecutionCheck)
getCommand
Link copied to clipboard
open fun getCommand(name: String): BaseSlashCommand?
onCommandAutoCompleteEvent
Link copied to clipboard
open override fun onCommandAutoCompleteEvent(event: CommandAutoCompleteInteractionEvent)

Handled when discord send an CommandAutoCompleteInteractionEvent

onEvent
Link copied to clipboard
open override fun onEvent(event: GenericEvent)
onSlashCommandEvent
Link copied to clipboard
open override fun onSlashCommandEvent(event: SlashCommandInteractionEvent)

Handled when discord send an SlashCommandInteractionEvent

Properties

exceptionHandler
Link copied to clipboard
open override val exceptionHandler: ExceptionHandler
registry
Link copied to clipboard
open override val registry: List<BaseSlashCommand>

The command registry.