Skip to content
Fully modular, powerful JDA command processor library written in Kotlin
Kotlin
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
core
example bump to jda 4 beta & param to configure jda builder in start Jun 19, 2019
mongo bump jda-reactor, switched to sync driver, fixed issue with permissio… Jun 20, 2019
.gitignore initial commit Apr 21, 2019
.travis.yml updated readme, added assembly plugin, added travis config Jun 6, 2019
LICENSE more changes to the system May 18, 2019
README.md bump to jda 4 beta & param to configure jda builder in start Jun 19, 2019
pom.xml exclude example Jun 19, 2019

README.md

Build Status

Cubebase (W.I.P)

Cubebase is a fully modular, powerful JDA command processor library with useful utilities and diverse support written in Kotlin. This library is heavily inspired by ktor.

License

Cubebase is licensed under GNU AGPLv3, read more about the license here.

JDA 4.x BETA

This libraries make use of JDA (Java Discord API) which is a wrapper for Discord APIs. JDA 4.x is currently still in alpha. Therefore this library might be unstable.

Getting Started

Maven

<repositories>
	<repository>
	    <id>jitpack.io</id>
	    <url>https://jitpack.io</url>
	</repository>
</repositories>

<dependencies>
    <dependency>
	    <groupId>com.github.Cubxity</groupId>
	    <artifactId>cubebase</artifactId>
	    <version>COMMIT</version>
	</dependency>
</dependencies>

Gradle

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.Cubxity:cubebase:COMMIT'
}

Check examples for detailed example

Starting a bot:

fun main() {
    // Creates a bot with token from environment variable
    createBot(System.getenv("token")) {
        // Installs features
        install(Purifier)
        install(Embed) {
            colorFactory = { Color.CYAN }
            footerFactory = { MessageEmbed.Footer("Requested by ${it.event.author.name}", it.event.author.avatarUrl, null) }
        }

        // Installs modules
        processing {
            module("ping") {
                command("ping", "ping <msg...>") {
                    handler {
                        embed {
                            title = "Pong!"
                            a("Your message was ")
                            code(arg<String>("msg")!!)
                        }
                    }
                }
            }
        }
    }.start()
}

Benchmark

Cubebase is able to process 249474790+ commands in 1013ms on an i5-8400 system with 16GBs of ram. Benchmark is done using this

Libraries

You can’t perform that action at this time.