/kdaw

a lightweight Discord API wrapper written in Kotlin. It can run even large scale bots stably.

Primary LanguageKotlinApache License 2.0Apache-2.0

Kdaw

Kdaw(Kotlin Discord Api Wrapper) is a lightweight Discord API wrapper written in Kotlin. It can run even large scale bots stably.

Build Result jitpack release version License developer

⚠️This library is currently under development (beta version is 0.*.*), and the API will be changed or removed without notice.

⚡ Quickstart

fun main() {
    Kdaw.create("<< insert bot token here >>") {
        listen<ServerMessageCreateEvent>(priority = 1) {
            println("[Message] ${it.server} | ${it.channel} | ${it.user} | ${it.text}")
        }

        listen(BasicListener)
    }
}

object BasicListener {
    @EventTarget
    fun ready(event: ReadyEvent) {
        println("Hello~~!")
    }
    
    @EventTarget(priority = 5)
    suspend fun message(event: ServerMessageCreateEvent) {
        event.reply("hi!")
    } 
}

⚙️ Installation

Replace <version> with the version you want to use of jitpack.

Gradle Kotlin DSL
repositories {
    maven("https://jitpack.io")
}
dependencies {
    implementation("com.github.Kotlin-Chan:kdaw:<version>")
}
Gradle
repositories {
    maven { url "https://jitpack.io" }
}
dependencies {
    implementation "com.github.Kotlin-Chan:kdaw:<version>"
}
Maven
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependency>
    <groupId>com.github.Kotlin-Chan</groupId>
    <artifactId>kdaw</artifactId>
    <version>version</version>
</dependency>

📝 Dependencies