add Lavalink Dependency and impl stub
All checks were successful
github-mirror / push-github (push) Successful in 4s
Build / Gradle-Build (push) Successful in 26s
Test / Gradle-Test (push) Successful in 10s

This commit is contained in:
Tueem 2025-02-10 00:34:52 +01:00
parent 9aae9cd77b
commit bf17ae800c
Signed by: tueem
GPG Key ID: F2CE0513D231AD7A
4 changed files with 38 additions and 3 deletions

View File

@ -14,9 +14,8 @@ plugins {
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
maven {
url = uri("https://git.tomatentum.net/api/packages/tueem/maven")
}
maven("https://maven.lavalink.dev/releases")
maven("https://git.tomatentum.net/api/packages/tueem/maven")
}
dependencies {
@ -32,6 +31,7 @@ dependencies {
implementation(libs.logback)
implementation(libs.log4jtoslf4j)
implementation(libs.jultoslf4j)
implementation(libs.lavalink)
implementation(libs.marinaralib)
implementation(libs.marinarajavacord)

View File

@ -50,4 +50,5 @@ public class App {
marinara.getRegistry().registerCommands();
}
}

View File

@ -0,0 +1,32 @@
package net.tomatentum.tomatenmusic3.lavalink;
import java.util.Collections;
import java.util.Set;
import org.javacord.api.DiscordApi;
import dev.arbjerg.lavalink.client.Helpers;
import dev.arbjerg.lavalink.client.LavalinkClient;
import dev.arbjerg.lavalink.client.NodeOptions;
import net.tomatentum.tomatenmusic3.Config;
public class LavalinkWrapper {
private Config config;
private DiscordApi client;
private LavalinkClient lavaClient;
public LavalinkWrapper(Config config, DiscordApi client) {
this.config = config;
this.client = client;
this.lavaClient = new LavalinkClient(Helpers.getUserIdFromToken(config.token()));
getNodes().forEach((x) -> lavaClient.addNode(x));
}
protected Set<NodeOptions> getNodes() {
//TODO
return Collections.emptySet();
}
}

View File

@ -10,6 +10,7 @@ slf4j = "2.0.16"
log4jtoslf4j = "2.24.3"
jultoslf4j = "2.0.16"
marinara = "1.0.0-RC1-9d88ca9"
lavalink = "3.1.0"
[libraries]
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit-jupiter" }
@ -19,6 +20,7 @@ logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback"}
slf4j = { module = "org.slf4j:slf4j-api", version.ref = "slf4j"}
log4jtoslf4j = { module = "org.apache.logging.log4j:log4j-to-slf4j", version.ref = "log4jtoslf4j"}
jultoslf4j = { module = "org.slf4j:jul-to-slf4j", version.ref = "jultoslf4j"}
lavalink = { module = "dev.arbjerg:lavalink-client", version.ref = "lavalink"}
marinaralib = { module = "net.tomatentum.Marinara:lib-dev", version.ref = "marinara"}
marinarajavacord = { module = "net.tomatentum.Marinara:wrapper-javacord-dev", version.ref = "marinara"}