Default Slash Command Client
open class DefaultSlashCommandClient(packageName: String) : SlashCommandClient, CoroutineScope
Content copied to clipboard
Extendable coroutine based SlashCommandClient
See also
kotlinx.coroutines.CoroutineScope
Parameters
package Name
The package name where commands are located (me.example.commands)
Constructors
DefaultSlashCommandClient
Link copied to clipboard
Functions
create Context
Link copied to clipboard
open suspend fun createContext(event: SlashCommandEvent, command: BaseSlashCommand): SlashCommandContext
Content copied to clipboard
get Command
Link copied to clipboard
on Generic Exception
Link copied to clipboard
open fun onGenericException(context: SlashCommandContext, command: BaseSlashCommand, ex: Exception)
Content copied to clipboard
Executed when a command return an exception
on Permissions Lack Exception
Link copied to clipboard
Executed when an interaction event does not meet the required permissions.
on Slash Command Event
Link copied to clipboard
Handled when discord send an SlashCommandEvent
with Metrics
Link copied to clipboard
Enable prometheus metrics exporters
with Shard Manager
Link copied to clipboard
Register the event listener to receive SlashCommandEvent from your ShardManager.