drpc4k (discord-rpc for Kotlin) is a project that aims to provide Kotlin bindings for discord-rpc
Library is in early development, lacking extensive testing.
Only Rich Presence is available at the moment.
Currently, the only working method of connecting is trough a JNA wrapper.
I plan on making a pure Kotlin one too though.
Make sure you enable the jcenter
repository for releases.
For snapshots, please add https://oss.jfrog.org/simple/libs-snapshot.
When using gradle (groovy or kts):
repositories {
jcenter()
/* for snapshots */
maven("https://oss.jfrog.org/simple/libs-snapshot")
}
Then add the dependency:
dependencies {
/* project dependencies */
compile("be.bluexin:drpc4k:0.9")
}
Maven :
<dependency>
<groupId>be.bluexin</groupId>
<artifactId>drpc4k</artifactId>
<version>0.9</version>
<type>pom</type>
</dependency>
A list of versions can be found on bintray. Snapshot versions can be found on OJO.
You can also directly download it from Bintray.
To use Discord Rich Presence, the easiest way is to use the Actor wrapper be.bluexin.drpc4k.jna.RPCActor. It will handle everything using lightweight Kotlin Coroutines. An example usage can be found at src/test/kotlin/JnaExampleActor.kt.