BotBase

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
fun interface BotModule

Properties

Link copied to clipboard
lateinit var gateway: AutoGateway
Link copied to clipboard
val logger: KLogger
Link copied to clipboard

Modules are plugins which implement bot functionality

Functions

Link copied to clipboard
fun BotBase.classicCommands(commandPrefix: String = ".", commands: CommandBuilder.() -> Unit)

Installs the classic command DSL and provides a scope for defining commands

Link copied to clipboard
fun BotBase.events(eventsBuilder: EventDispatcherWithContext.() -> Unit)

Allows simply forwarding events on to user space

Link copied to clipboard
fun BotBase.interactions(trim: Boolean = true, commands: InteractionBuilder.() -> Unit)

Installs the interactions DSL and provides a scope for defining commands

Link copied to clipboard
Link copied to clipboard
suspend fun setStatus(status: String, userStatus: UserStatus = UserStatus.ONLINE)
suspend fun setStatus(status: UserStatusActivity, afk: Boolean = false, idleTime: Int? = null, userStatus: UserStatus = UserStatus.ONLINE)

Sets the status of the bot

Link copied to clipboard
suspend fun shutdown()

Shutdown this bot instance.