Package me. jakejmattson. discordkt. dsl
Primary builders and events used to develop bots.
Types
Link copied to clipboard
data class BotConfiguration( val packageName: String, val mentionAsPrefix: Boolean, val logStartup: Boolean, val documentCommands: Boolean, val recommendCommands: Boolean, val searchCommands: Boolean, val deleteInvocation: Boolean, val dualRegistry: Boolean, val commandReaction: DiscordEmoji?, val theme: Color?, val intents: Intents, val defaultPermissions: Permissions, val entitySupplyStrategy: EntitySupplyStrategy<*>, prefix: suspend (DiscordContext) -> String, mentionEmbed: Pair<String?, suspend EmbedBuilder.(DiscordContext) -> Unit?>, exceptionHandler: suspend DktException<*>.() -> Unit)
Content copied to clipboard
Contains all properties configured when the bot is created.
Link copied to clipboard
class CommandException<T : Exception>(exception: T, val event: CommandEvent<*>) : DktException<T>
Content copied to clipboard
Contains an exception thrown from a command event.
Link copied to clipboard
Shared interface for handling exceptions.
Link copied to clipboard
class ListenerException<T : Exception>(exception: T, val event: Event) : DktException<T>
Content copied to clipboard
Contains an exception thrown from a listener.
Link copied to clipboard
data class Menu(pages: MutableList<EmbedBuilder>, buttons: MutableList<MutableList<DktButton>>)
Content copied to clipboard
Contains menu data and navigation functions.
Link copied to clipboard
Type-safe builder for creating paginated embeds with button components.
Link copied to clipboard
Builder functions for menu buttons.
Link copied to clipboard
class Precondition(priority: Int, construct: suspend PreconditionBuilder.() -> Unit) : BuilderRegister
Content copied to clipboard
This is not for you...
Link copied to clipboard
data class SimpleConfiguration( var mentionAsPrefix: Boolean = true, var logStartup: Boolean = true, var documentCommands: Boolean = true, var recommendCommands: Boolean = true, var searchCommands: Boolean = true, var deleteInvocation: Boolean = true, var dualRegistry: Boolean = true, var commandReaction: DiscordEmoji? = Emojis.eyes, var theme: Color? = null, var intents: Intents = Intents.none, var defaultPermissions: Permissions = Permissions(Permission.UseApplicationCommands), var entitySupplyStrategy: EntitySupplyStrategy<*> = EntitySupplyStrategy.cacheWithCachingRestFallback)
Content copied to clipboard
Simple configuration values that don't require a builder.
Link copied to clipboard
A modified responder for slash commands.
Functions
Link copied to clipboard
fun precondition(priority: Int = 5, construct: suspend PreconditionBuilder.() -> Unit): Precondition
Content copied to clipboard
Create a block for registering preconditions.