Fork of kord, mainly used for Voice

Related tags

Video/Audio kord
Overview

Kord

Discord Download Github CI status (branch)

Kord is still in an experimental stage, as such we can't guarantee API stability between releases. While we'd love for you to try out our library, we don't recommend you use this in production just yet.

If you have any feedback, we'd love to hear it, hit us up on discord or write up an issue if you have any suggestions!

What is Kord

Kord is a coroutine-based, modularized implementation of the Discord API, written 100% in Kotlin.

Why use Kord

Kord was created as an answer to the frustrations of writing Discord bots with other JVM libraries, which either use thread-blocking code or verbose and scope restrictive reactive systems. We believe an API written from the ground up in Kotlin with coroutines can give you the best of both worlds: The conciseness of imperative code with the concurrency of reactive code.

Aside from coroutines, we also wanted to give the user full access to lower level APIs. Sometimes you have to do some unconventional things, and we want to allow you to do those in a safe and supported way.

Status of Kord

Right now Kord should provide a full mapping of the non-voice API. We're currently working on a testing library for easy bot testing against a semi mocked client as well as our own command system to facilitate more complex bot development.

Documentation

Installation

Replace {version} with the latest version number on maven central.

For Snapshots replace {version} with {branch}-SNAPSHOT

e.g: 0.7.x-SNAPSHOT

Download

Gradle (groovy)

repositories {
    mavenCentral()
    // Kord Snapshots Repository (Optional):
    maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
    }

}
dependencies {
    implementation("dev.kord:kord-core:{version}")
}

Gradle (kotlin)

repositories {
    mavenCentral()
    // Kord Snapshots Repository (Optional):
    maven("https://oss.sonatype.org/content/repositories/snapshots")

}

dependencies {
    implementation("dev.kord:kord-core:{version}")
}

Maven

Kord Snapshots Repository (Optional):
<repository>
    <id>snapshots-repoid>
    <url>https://oss.sonatype.org/content/repositories/snapshotsurl>
    <releases>
        <enabled>falseenabled>
    releases>
    <snapshots>
        <enabled>trueenabled>
    snapshots>
repository>

<dependency>
    <groupId>dev.kordgroupId>
    <artifactId>kord-coreartifactId>
    <version>{version}version>
dependency>

Modules

Core

A higher level API, combining rest and gateway, with additional (optional) caching. Unless you're writing your own abstractions, we'd recommend using this.

{ if (message.content != "!ping") return@on val response = message.channel.createMessage("Pong!") response.addReaction(pingPong) delay(5000) message.delete() response.delete() } client.login() } ">
suspend fun main() {
    val client = Kord("your bot token")
    val pingPong = ReactionEmoji.Unicode("\uD83C\uDFD3")

    client.on<MessageCreateEvent> {
        if (message.content != "!ping") return@on

        val response = message.channel.createMessage("Pong!")
        response.addReaction(pingPong)

        delay(5000)
        message.delete()
        response.delete()
    }

    client.login()
}

Rest

A low level mapping of Discord's REST API. Requests follow Discord's rate limits.

suspend fun main() {
    val rest = RestClient("your bot token")

    rest.channel.createMessage("605212557522763787") {
        content = "Hello Kord!"

        embed {
            color = Color.BLUE
            description = "Hello embed!"
        }
    }

}

Gateway

A low level mapping of Discord's Gateway, which maintains the connection and rate limits commands.

gateway.stop() "!detach" -> gateway.detach() } }.launchIn(gateway) gateway.start("your bot token") } ">
suspend fun main() {
    val gateway = DefaultGateway()

    gateway.on<MessageCreate> {
        println("${message.author.username}: ${message.content}")
        val words = message.content.split(' ')
        when (words.firstOrNull()) {
            "!close" -> gateway.stop()
            "!detach" -> gateway.detach()
        }
    }.launchIn(gateway)

    gateway.start("your bot token")
}

FAQ

Will you support kotlin multi-platform

We will, there's an issue open to track the features we want/need to make a transition to MPP smooth.

When will you document your code

Yes.

You might also like...
🗣 An overlay that gets your user’s voice permission and input as text in a customizable UI
🗣 An overlay that gets your user’s voice permission and input as text in a customizable UI

Overview Voice overlay helps you turn your user's voice into text, providing a polished UX while handling for you the necessary permission. Demo You c

🗣 An overlay that gets your user’s voice permission and input as text in a customizable UI
🗣 An overlay that gets your user’s voice permission and input as text in a customizable UI

Overview Voice overlay helps you turn your user's voice into text, providing a polished UX while handling for you the necessary permission. Demo You c

Embeddable custom voice assistant for Android applications
Embeddable custom voice assistant for Android applications

Aimybox voice assistant Open source voice assistant built on top of Aimybox SDK iOS version is available here Key Features Provides ready to use UI co

Open Source Messenger App For Android - Real-time Messaging, Voice and Video Calls

Open Source Messenger App For Android - Real-time Messaging, Voice and Video Calls

pokestack is an all-in-one solution for mobile voice interfaces on Android.
pokestack is an all-in-one solution for mobile voice interfaces on Android.

Extensible Android mobile voice framework: wakeword, ASR, NLU, and TTS. Easily add voice to any Android app!

Proof-of-Concept messaging and "voice over IP" server that uses microservices

bullets THIS IS A WIP PROJECT. Proof-of-Concept messaging and "voice over IP" server that uses microservices. The project uses many technologies. Such

RecordMe - Record your voice application with kotlin
RecordMe - Record your voice application with kotlin

RecordMe A simple voice recording app. Made Using : Kotlin, Navigation Component

Calliope - Android application for daily diary with voice recording

Calliope Android application for daily diary with voice recording. Contribution

Play casual chess on lichess.org via voice commands

Lichess-by-Voice lichess.org is a cost-free, ad-free chess server. Lichess, as well as this app, is Open Source. The app connects to your Lichess acco

Open-sourced voice labeling application
Open-sourced voice labeling application

vLabeler vLabeler is an open-sourced voice labeling application, aiming: Modern and fluent UI/UX Customizable labeling/import/export, to be used by di

Alan AI: In-app voice assistant SDK for Android
Alan AI: In-app voice assistant SDK for Android

Alan AI: In-app voice assistant SDK for Android Alan Platform • Alan Studio • Docs • FAQ • Blog • Twitter Quickly add voice to your app with the Alan

Vanilla Music Player for Android (abandoned). Visit https://github.com/vanilla-music/vanilla for an actively developed fork

Translating You can help translate here. If your language isn't on the list, open an issue and I can add it. Building To build you will need: A Java c

A fork of our clean architecture boilerplate using the Model-View-Intent pattern

Android Clean Architecture MVI Boilerplate Note: This is a fork of our original Clean Architecture Boilerplate, except in this repo we have switched o

A fork of our clean architecture boilerplate, this time using the Android Architecture Components

Android Clean Architecture Components Boilerplate Note: This is a fork of our original Clean Architecture Boilerplate, except in this repo we have swi

Fork of the HoloGraphLibrary by Daniel Nadeau with additionnal features
Fork of the HoloGraphLibrary by Daniel Nadeau with additionnal features

HoloGraphLibrary Fork of the HoloGraphLibrary by Daniel Nadeau, with additionnal features Welcome This is a library written to allow beautiful graphs

Fork of svg-android +SVN history +Maven +more

Status: Unmaintained. Discontinued. This project is no longer being developed or maintained. _ This is forked from the awesome but unmaintained: http:

Unofficial, FOSS-friendly fork of the original Telegram client for Android

or 1McafEgMvqAVujNLtcJumZHxp2UfaNByqs Telegram-FOSS Telegram is a messaging app with a focus on speed and security. It’s superfast, simple and free. T

Highly optimized Airplane fork focusing on stability and performance.

Sugarcane Highly optimized Airplane fork focusing on stability and performance. NOTE: We borrow some patches from Yatopia Reminder This project is sti

A FDPClient fork , It aims to add more modules.

LightClient A FDPClient fork , It aims to add more modules. You can download development version at Github-Actions , Release at Release Only running o

Owner
Mixtape OSS
forks of oss projects that mixtape may or may not use ;)
Mixtape OSS
Open-sourced voice labeling application

vLabeler vLabeler is an open-sourced voice labeling application, aiming: Modern and fluent UI/UX Customizable labeling/import/export, to be used by di

null 42 Dec 23, 2022
A fork of audio-analyzer-for-android in Google code, with a lot of enhancement.

Audio Spectrum Analyzer for Android A fork of Audio spectrum Analyzer for Android (See README.old for its original readme) This software shows the fre

null 74 Jan 1, 2023
TunePlayer is a basic music player app aimed at showing how MusicServiceCompat and MusicBrowerCompat can be used to build a music playback service

TunePlayer TunePlayer is a basic music player app aimed at showing how MusicServiceCompat and MusicBrowerCompat can be used to build a music playback

Abdulmalik 6 Nov 18, 2022
Command framework built around Kord, built to be robust and scalable, following Kord's convention and design patterns.

Command framework built around Kord, built to be robust and scalable, following Kord's convention and design patterns.

ZeroTwo Bot 4 Jun 15, 2022
Extensible Android mobile voice framework: wakeword, ASR, NLU, and TTS. Easily add voice to any Android app!

Spokestack is an all-in-one solution for mobile voice interfaces on Android. It provides every piece of the speech processing puzzle, including voice

Spokestack 57 Nov 20, 2022
My solutions for Advent of Code 2021 puzzles, mainly using Kotlin.

Advent of Code 2021 Featuring Kotlin What's that ? https://adventofcode.com/2021/about Advent of Code is an Advent calendar of small programming puzzl

Petrole 0 Dec 2, 2021
Very simple Morse API text translator. Mainly to do some testing with jitpack, API development etc.

Very simple Morse text translator API. Far from finish or even being reliable. Use for single sentence. Mainly to test github dependency for Android

Piotr Dymala 0 Dec 30, 2021
A modular framework for building Discord bots in Kotlin using Kordex and Kord

Mik Bot A modular framework for building Discord bots in Kotlin using Kordex and Kord **If you are here for mikmusic, click here and there Deployment

Michael Rittmeister 31 Dec 24, 2022
🌨️ Simple, intuitive, and opinionated command handling library for Kord

??️ Snow Simple, intuitive, and opinionated command handling library for Kord Why? Since I maintain two Discord bots, both in Kotlin, Nino and Noel (p

Noel ʕ •ᴥ•ʔ 1 Jan 16, 2022
Kord-selfbot is discord selfbot library written in kotlin

Kord-selfbot is discord selfbot library written in kotlin

Jombi 1 Aug 16, 2022