SlashCommandClient

interface SlashCommandClient : EventListener

Functions

getCommand
Link copied to clipboard
open fun getCommand(name: String): BaseSlashCommand?
onEvent
Link copied to clipboard
open override fun onEvent(event: GenericEvent)
onSlashCommandEvent
Link copied to clipboard
abstract fun onSlashCommandEvent(event: SlashCommandEvent)

Handled when discord send an SlashCommandEvent

withJDA
Link copied to clipboard
open fun withJDA(jda: JDA)

Register the event listener to receive SlashCommandEvent from your JDA shard.

withMetrics
Link copied to clipboard
open fun withMetrics()

Enable prometheus metrics exporters

withShardManager
Link copied to clipboard
open fun withShardManager(shardManager: ShardManager)

Register the event listener to receive SlashCommandEvent from your ShardManager.

Properties

registry
Link copied to clipboard
abstract val registry: List<BaseSlashCommand>

The command registry.

Inheritors

DefaultSlashCommandClient
Link copied to clipboard