From e9c4674c3cc2ac5d2c2dc2a9378211fcad626f9b Mon Sep 17 00:00:00 2001 From: Luca Kellermann Date: Mon, 12 Aug 2024 01:09:42 +0200 Subject: [PATCH] Update module READMEs (#962) This reduces duplication in the README files of the individual modules and fixes some outdated links and code. [skip ci] --- core/README.md | 60 +++++++---------------------------------------- gateway/README.md | 58 ++++++--------------------------------------- rest/README.md | 58 ++++++--------------------------------------- voice/README.md | 13 +++++----- 4 files changed, 29 insertions(+), 160 deletions(-) diff --git a/core/README.md b/core/README.md index 01d53ad43a6d..591693de64dc 100644 --- a/core/README.md +++ b/core/README.md @@ -1,8 +1,8 @@ # Kord Core -Kord `core` is an implementation of the discord api build on top of the [gateway](https://gitlab.com/kordlib/kord/tree/master/gateway), -[rest](https://gitlab.com/kordlib/kord/tree/master/rest) and [cache](https://gitlab.com/kordlib/cache) modules. It features a high level representation of Discord's entities and their behaviour -in a non-blocking, coroutine focused, event-driven design. +Kord `core` is an implementation of the discord api build on top of the [gateway](../gateway), [rest](../rest) and +[cache](https://github.com/kordlib/cache) modules. It features a high level representation of Discord's entities and +their behavior in a non-blocking, coroutine focused, event-driven design. ## Example usage @@ -31,45 +31,22 @@ suspend fun main() { } } ``` -## Installation - -Replace `{version}` with the latest version number on maven central. - -For Snapshots replace `{version}` with `{branch}-SNAPSHOT` -e.g: `0.7.x-SNAPSHOT` +## Installation -[![Download](https://img.shields.io/nexus/r/dev.kord/kord-core?color=fb5502&label=Kord&logoColor=05c1fd&server=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F&style=for-the-badge) ](https://search.maven.org/search?q=g:dev.kord) -[![Snapshot](https://img.shields.io/nexus/s/dev.kord/kord-core?label=SNAPSHOT&server=https%3A%2F%2Foss.sonatype.org%2F&style=for-the-badge)](https://oss.sonatype.org/#nexus-search;quick~dev.kord) -### Gradle (groovy) +See the root [README](../README.md#installation) for more information. -```groovy -repositories { - mavenCentral() - // Kord Snapshots Repository (Optional): - maven("https://oss.sonatype.org/content/repositories/snapshots") -} -``` +### Gradle (Kotlin) -```groovy +```kotlin dependencies { implementation("dev.kord:kord-core:{version}") } ``` -### Gradle (kotlin) +### Gradle (Groovy) -```kotlin -repositories { - mavenCentral() - // Kord Snapshots Repository (Optional): - maven("https://oss.sonatype.org/content/repositories/snapshots") -} -``` - ---- - -```kotlin +```groovy dependencies { implementation("dev.kord:kord-core:{version}") } @@ -77,26 +54,7 @@ dependencies { ### Maven -##### Kord Snapshots Repository (Optional): - ```xml - - - snapshots-repo - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - -``` - ---- - -```xml - dev.kord kord-core-jvm diff --git a/gateway/README.md b/gateway/README.md index af7c3cee1de6..4a2fe9087172 100644 --- a/gateway/README.md +++ b/gateway/README.md @@ -1,6 +1,6 @@ # Kord gateway -A low-level implementation of discord's [gateway](https://discordapp.com/developers/docs/topics/gateway). +A low-level implementation of discord's [gateway](https://discord.com/developers/docs/topics/gateway). ## Example usage @@ -11,7 +11,6 @@ suspend fun main(args: Array) { val gateway = DefaultGateway { // optional builder for custom configuration client = HttpClient { install(WebSockets) - install(JsonFeature) } reconnectRetry = LinearRetry(2.seconds, 20.seconds, 10) sendRateLimiter = IntervalRateLimiter(120, 60.seconds) @@ -39,46 +38,22 @@ suspend fun main(args: Array) { } } ``` -## 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](https://img.shields.io/nexus/r/dev.kord/kord-gateway?color=fb5502&label=Kord&logoColor=05c1fd&server=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F&style=for-the-badge) ](https://search.maven.org/search?q=g:dev.kord) -[![Snapshot](https://img.shields.io/nexus/s/dev.kord/kord-gateway?label=SNAPSHOT&server=https%3A%2F%2Foss.sonatype.org%2F&style=for-the-badge)](https://oss.sonatype.org/#nexus-search;quick~dev.kord) +## Installation -### Gradle (groovy) +See the root [README](../README.md#installation) for more information. -```groovy -repositories { - mavenCentral() - // Kord Snapshots Repository (Optional): - maven("https://oss.sonatype.org/content/repositories/snapshots") -} -``` +### Gradle (Kotlin) -```groovy +```kotlin dependencies { implementation("dev.kord:kord-gateway:{version}") } ``` -### Gradle (kotlin) - -```kotlin -repositories { - mavenCentral() - // Kord Snapshots Repository (Optional): - maven("https://oss.sonatype.org/content/repositories/snapshots") -} -``` - ---- +### Gradle (Groovy) -```kotlin +```groovy dependencies { implementation("dev.kord:kord-gateway:{version}") } @@ -86,26 +61,7 @@ dependencies { ### Maven -##### Kord Snapshots Repository (Optional): - ```xml - - - snapshots-repo - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - -``` - ---- - -```xml - dev.kord kord-gateway-jvm diff --git a/rest/README.md b/rest/README.md index 3cef5021b66b..829d54c6aaeb 100644 --- a/rest/README.md +++ b/rest/README.md @@ -13,48 +13,23 @@ suspend fun main(args: Array) { val username = rest.user.getCurrentUser().username println("using $username's token") } -``` -## 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](https://img.shields.io/nexus/r/dev.kord/kord-rest?color=fb5502&label=Kord&logoColor=05c1fd&server=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F&style=for-the-badge) ](https://search.maven.org/search?q=g:dev.kord) -[![Snapshot](https://img.shields.io/nexus/s/dev.kord/kord-rest?label=SNAPSHOT&server=https%3A%2F%2Foss.sonatype.org%2F&style=for-the-badge)](https://oss.sonatype.org/#nexus-search;quick~dev.kord) +## Installation +See the root [README](../README.md#installation) for more information. -### Gradle (groovy) +### Gradle (Kotlin) -```groovy -repositories { - mavenCentral() - // Kord Snapshots Repository (Optional): - maven("https://oss.sonatype.org/content/repositories/snapshots") -} -``` - -```groovy +```kotlin dependencies { implementation("dev.kord:kord-rest:{version}") } ``` -### Gradle (kotlin) - -```kotlin -repositories { - mavenCentral() - // Kord Snapshots Repository (Optional): - maven("https://oss.sonatype.org/content/repositories/snapshots") -} -``` - ---- +### Gradle (Groovy) -```kotlin +```groovy dependencies { implementation("dev.kord:kord-rest:{version}") } @@ -62,26 +37,7 @@ dependencies { ### Maven -##### Kord Snapshots Repository (Optional): - ```xml - - - snapshots-repo - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - -``` - ---- - -```xml - dev.kord kord-rest-jvm diff --git a/voice/README.md b/voice/README.md index e3daf9504b7b..b46ce67bd2ea 100644 --- a/voice/README.md +++ b/voice/README.md @@ -124,19 +124,19 @@ processIncomingAudio(connection.streams.incomingAudioFrames) ## Installation -Replace `{version}` with the latest version number on maven central. +See the root [README](../README.md#installation) for more information. -[![Download](https://img.shields.io/maven-central/v/dev.kord/kord-voice.svg?color=fb5502&label=Kord&logoColor=05c1fd&style=for-the-badge)](https://search.maven.org/search?q=g:%22dev.kord%22%20AND%20a:%22kord-voice%22) +### Gradle (Kotlin) -### Gradle (groovy) -```groovy +```kotlin dependencies { implementation("dev.kord:kord-voice:{version}") } ``` -### Gradle (kotlin) -```kotlin +### Gradle (Groovy) + +```groovy dependencies { implementation("dev.kord:kord-voice:{version}") } @@ -144,7 +144,6 @@ dependencies { ### Maven -##### Kord Snapshots Repository (Optional): ```xml dev.kord