add Lavalink Dependency and impl stub
This commit is contained in:
@@ -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)
|
||||
|
@@ -50,4 +50,5 @@ public class App {
|
||||
|
||||
marinara.getRegistry().registerCommands();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user