A pure-Kotlin library for bots to interface with Revolt

Overview

RevoltKt

A pure-Kotlin library for bots to interface with Revolt

GitHub GitHub release (latest by date including pre-releases) GitHub Repo stars


Sample Usage

println("Error occured in event $event") error.printStackTrace() } }.build() client.runForever() } ">
import me.maya.revolt.defaultClientBuilder
import me.maya.revolt.events.Event
import me.maya.revolt.events.EventHandler
import me.maya.revolt.registerEventHandler
import me.maya.revolt.setErrorCallback
import me.maya.revolt.token

val token = System.getenv("TOKEN")

fun main() {
    val client = defaultClientBuilder {
        token(token)

        registerEventHandler(object: EventHandler() {
            override suspend fun onMessage(event: Event.Message) {.
                println("Received ${event.message.content} from ${event.message.author.username}")

                if (event.message.author.id == "my_owner_id") client.close()
            }
        })

        setErrorCallback { event, error ->
            println("Error occured in event $event")
            error.printStackTrace()
        }
    }.build()
    client.runForever()
}

Installation

Gradle is confusing. I know, I've used it for too long. You can download my sample repo for quick setup and use!

Or if you'd rather, you can download the artifacts from GitHub releases and add them manually:

dependencies {
    implementation(files("Revolt-0.1.1-full.jar"))
    // `full` contains all dependencies (ktor, kotlin-reflect etc)
    // If needed, you can use `Revolt-0.1.1.jar` for a version without dependencies
}

Support

I have a Revolt support server you are welcome to join and ask for help. There I will post announcements as well.

Contributing

This project is completely open source! As long as you have an idea, feel free to make a pull request. Be sure to test it before hand.

See Also

You might also like...
Kotlin library for Android
Kotlin library for Android

KAndroid Kotlin library for Android providing useful extensions to eliminate boilerplate code in Android SDK and focus on productivity. Download Downl

A Kotlin DSL wrapper around the mikepenz/MaterialDrawer library.
A Kotlin DSL wrapper around the mikepenz/MaterialDrawer library.

MaterialDrawerKt Create navigation drawers in your Activities and Fragments without having to write any XML, in pure Kotlin code, with access to all t

🔓 Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.
🔓 Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.

EasyPermissions-ktx Kotlin version of the popular googlesample/easypermissions wrapper library to simplify basic system permissions logic on Android M

Android Spinner Dialog Library supported on both Java and Kotlin, Use for single or multi selection of choice
Android Spinner Dialog Library supported on both Java and Kotlin, Use for single or multi selection of choice

SpinnerDialog Android Spinner Dialog Library, Use for single or multi selection of choice Android UI Download To include SpinnerDialog in your project

A Kotlin library for reactive and boilerplate-free SharedPreferences in Android
A Kotlin library for reactive and boilerplate-free SharedPreferences in Android

KPreferences A Kotlin library for reactive and boilerplate-free Shared Preferences in Android. With KPreferences you can use Kotlin's marvelous delega

AbstractMvp 0.8 0.0 Kotlin  is a library that provides abstract components for MVP architecture realization, with problems solutions that are exist in classic MVP.
AbstractMvp 0.8 0.0 Kotlin is a library that provides abstract components for MVP architecture realization, with problems solutions that are exist in classic MVP.

MinSDK 14+ AbstractMvp AbstractMvp is a library that provides abstract components for MVP architecture realization, with problems solutions that are e

The most complete and powerful data-binding library and persistence infra for Kotlin 1.3, Android & Splitties Views DSL, JavaFX & TornadoFX, JSON, JDBC & SQLite, SharedPreferences.

Lychee (ex. reactive-properties) Lychee is a library to rule all the data. ToC Approach to declaring data Properties Other data-binding libraries Prop

A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android

Blue-Falcon A Bluetooth "Cross Platform" Kotlin Multiplatform library for iOS, Android, MacOS, Raspberry Pi and Javascript. Bluetooth in general has t

A lightweight cache library written in Kotlin

[NEW] Released to Maven Central: 'com.github.yundom:kache:1.x.x' Kache A runtime in-memory cache. Installation Put this in your build.gradle implemen

Releases(0.1.1a)
Owner
Maya
Maya
A pure Kotlin/Multiplatform implementation of group operations on Curve25519.

curve25519-kotlin A pure Kotlin/Multiplatform implementation of group operations on Curve25519. Gradle Kotlin DSL: dependencies { implementation("

Andrey Pfau 9 Dec 22, 2022
Template (pure) for KMM application with DI support

KMM di template Template (pure) for KMM application with DI support. Uses Multiplatform-DI for Dependency Injection Features Common architecture (VIP)

Anna Zharkova 8 Oct 18, 2022
Interface for SAMANA-User

SAMANA-USER Table Of Contents Introduction Selected Theme Title Usage Feature Demo Youtube Layers Tech Stack Mad Scoreboard Introduction Samana projec

SAMANA 3 Oct 7, 2021
A simplified interface for interacting with in-memory cache implementations on the JVM

This library provides a simplified interface for interacting with in-memory cache implementations on the JVM. Think: "SLF4J but for caching"

null 5 Nov 29, 2022
EightyTwenty is life planner application with beautiful user interface.

EightyTwenty EightyTwenty is life planner application with beautiful user interface. Version 0.0.1 Add notes Add categories Add notes with image Move

Behzod Halil 3 Jul 15, 2022
Runtime Mobile Security (RMS) 📱🔥 - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime

Runtime Mobile Security (RMS) ?? ?? by @mobilesecurity_ Runtime Mobile Security (RMS), powered by FRIDA, is a powerful web interface that helps you to

Mobile Security 2k Dec 20, 2022
Run Kotlin/JS libraries in Kotlin/JVM and Kotlin/Native programs

Zipline This library streamlines using Kotlin/JS libraries from Kotlin/JVM and Kotlin/Native programs. It makes it possible to do continuous deploymen

Cash App 1.5k Dec 30, 2022
A somewhat copy past of Jetbrain's code from the kotlin plugin repo to make it humanly possible to test Intellij IDEA kotlin plugins that work on kotlin

A somewhat copy past of Jetbrain's code from the kotlin plugin repo to make it humanly possible to test Intellij IDEA kotlin plugins that work on kotlin

common sense OSS 0 Jan 20, 2022
Real life Kotlin Multiplatform project with an iOS application developed in Swift with SwiftUI, an Android application developed in Kotlin with Jetpack Compose and a backed in Kotlin hosted on AppEngine.

Conferences4Hall Real life Kotlin Multiplatform project with an iOS application developed in Swift with SwiftUI, an Android application developed in K

Gérard Paligot 98 Dec 15, 2022
[Android Library] A SharedPreferences helper library to save and fetch the values easily.

Preference Helper A SharedPreferences helper library to save and fetch the values easily. Featured in Use in your project Add this to your module's bu

Naveen T P 13 Apr 4, 2020