lavalink-devs / lavalink-client Goto Github PK
View Code? Open in Web Editor NEWLavalink client for lavalink v4
Home Page: https://lavalink.dev/
License: MIT License
Lavalink client for lavalink v4
Home Page: https://lavalink.dev/
License: MIT License
Receiving this maven error when ever I try importing it via commit hash.
Could not find artifact dev.arbjerg.lavalink:protocol-jvm:pom:8a6c376407205e8208aa452c8b59443774c2e754-SNAPSHOT in arbjergDev-snapshots (https://maven.arbjerg.dev/snapshots)
pom.xml:
<repository>
<id>arbjergDev-snapshots</id>
<name>Lavalink Repository</name>
<url>https://maven.arbjerg.dev/snapshots</url>
</repository>
...
<dependency>
<groupId>dev.arbjerg</groupId>
<artifactId>lavalink-client</artifactId>
<version>00786d310c97e44730796bfd616b5b15286de173-SNAPSHOT</version>
</dependency>
...
Edit by maintainer: Listeners stop getting events when they encounter uncaught exceptions.
I am having a weird issue.
so when i run my bot this will work fine:
node.on(TrackEndEvent.class).subscribe(NodeEventsHandler::trackEndEvent);
but after 5h+ it will stop sending TrackEventEvent
it leads to these methods:
@NonNull
public void trackEndEvent(TrackEndEvent event) {
var endReason = event.getEndReason();
endedEvent(endReason.getMayStartNext(), event.getTrack());
System.out.println(bot.getGuild() +" -> Track End: " + endReason.name());
}
public void endedEvent(boolean mayStartNext, Track endedTrack) {
if (mayStartNext) {
if (isLooping && endedTrack != null) {
getLink().createOrUpdatePlayer()
.setEncodedTrack(endedTrack.getEncoded())
.setPosition(0L)
.subscribe();
return;
}
if (isQueueLooping && endedTrack != null) {
addToQueue(endedTrack, null);
return;
}
nextTrack(null, null);
}
if (isAutoPlay && queue.isEmpty()) {
autoPlay(endedTrack);
return;
}
}
Node (Skipped/Replaced):
2024-01-21T16:08:17.280Z INFO 178040 --- [ XNIO-1 task-2] l.server.io.RequestLoggingFilter : PATCH /v4/sessions/okb2z23zukd0jjj8/players/1179002246478954516?noReplace=false, client=//, payload={"track":{"encoded":"QAABywMAF1dvcmxkJ3MgU21hbGxlc3QgVmlvbGluAANBSlIAAAAAAALCCgAWNjhFa2hWV0llVUxoSHhjYmkxUWh6SwABADVodHRwczovL29wZW4uc3BvdGlmeS5jb20vdHJhY2svNjhFa2hWV0llVUxoSHhjYmkxUWh6SwEAQGh0dHBzOi8vaS5zY2RuLmNvL2ltYWdlL2FiNjc2MTZkMDAwMGIyNzMwZjBlNzkwMGExMDJhYWE3MGVkMzBkM2UBAAxRTVJTWjIwMDMzMjQAB3Nwb3RpZnkBAAxPSyBPUkNIRVNUUkEBADVodHRwczovL29wZW4uc3BvdGlmeS5jb20vYWxidW0vN3JiZGdZS3oxREk0Z1hNV3ZlcVM1VAEANmh0dHBzOi8vb3Blbi5zcG90aWZ5LmNvbS9hcnRpc3QvNnMyMnQ1WTNwclFIeWFIV1VOMVIxQwABAGtodHRwczovL3Auc2Nkbi5jby9tcDMtcHJldmlldy8xYWU1MWI5ZTBhNDVlYzAyYzFlMzMwYmRhZDE4ODIxNzdmNDI4NThhP2NpZD1lNzFhZTk2YzMwZTU0ZmQ1OWI3MGIxNzgzMWVhYmY1NwAAAAAAAAAAAA=="}}
and the client got 0 events ๐
=========
and here i restarted the bot, and it started receiving the events once again
In some cases, users may only want to set their user data instead of having to create the entire Track object. Lavalink only requires the user to provide an encodedTrack to be able to play music.
Creating the Track object is annoying because it requires dev.arbjerg.lavalink.protocol.v4.Track, which includes many Kotlin elements that are not user-friendly for Java developers.
Moreover, while the identifier can be modified independently, why there isn't a similar option for user data?
Edit:
What I mean for not user-friendly
, my current solution
Currently the examples are in the test example, this is problematic and prevents us from adding unit tests.
Moving the examples to their own folder keeps them separate from the tests and keeps the project neatly organized.
Currently only the player state is updated, but track start and stop events should be handled by the lib internally as well to reflect the state of the cached player
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.