BJDA had been replaced by JDAK and Discord-UI
You should use them instead
A Discord Bot Framework based on JDA written in Kotlin
With many utilities to speed up you development.
Install the Core
<dependency>
<groupId>io.github.sonmoosans</groupId>
<artifactId>bjda-core</artifactId>
<version>6.0.1</version>
</dependency>
Keep it Light, Only Import all Needed Modules for your application
Create Slash Commands, Text Commands with few lines of code
command(name = "hello", description = "Say Hello") {
val size = int("size", "Size of example") {
optional { 6 }
}
execute {
event.reply("size: ${size()}").queue()
}
}
Application Command is also supported
val UserHelloCommand = userCommand(name = "hello") {
execute { event ->
event.reply("Hello").queue()
}
}
We highly recommend using DUI instead of BJDUI.
BJDUI is already outdated, and stopped maintain
Install BJDUI for UI Module
<dependency>
<groupId>io.github.sonmoosans</groupId>
<artifactId>bjdui</artifactId>
<version>BJDA_VERSION</version>
</dependency>
Create an interactive UI easily in few lines of code
And Update UI with component state
Beautiful, Readable, Flexible
Full Demo of above example
val app = UI {
pager {
embed {
title = "Page 1"
}
embed {
title = "Page 2"
}
}
}
app.reply(event)
You can see the documentation here
- Full Demo of a Todo App: Todo Bot
- Demo for production: Dishub is a great example with high performance.
val TestCommand = command(name = "test", description = "Example Command") {
val size = int("size", "Size of Text")
.optional()
.map({"${it}px"}) {
choices {
choice("sm", 1)
choice("md", 2)
choice("lg", 5)
}
default { 0 }
}
execute {
event.reply(size.value).queue()
}
}
We will move to Kord which is a discord api written in kotlin