blackfort-hosting / magmastream Goto Github PK
View Code? Open in Web Editor NEWA user-friendly Lavalink client designed for NodeJS.
Home Page: https://docs.blackforthosting.com
License: Apache License 2.0
A user-friendly Lavalink client designed for NodeJS.
Home Page: https://docs.blackforthosting.com
License: Apache License 2.0
Your Question
How to play Spotify?
Additional Context
client.manager = new Manager({ nodes: nodes, defaultSearchPlatform: 'spsearch', send: (id, payload) => { const guild = client.guilds.cache.get(id); if (guild) guild.shard.send(payload); } });
NodeJs Version: 20.4.0
Lavalink Version: 4.0.0-beta.2
Magmastream NPM Package Version: 2.2.1
Describe the Bug
Whenever I start a filter for ex: Bassboost, it works perfectly but when I do .clearFilters(), nothing happens. I have checked for errors etc and I had no errors.
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
It should clear all filters using clearFilters but it is not working and expected.
Screenshots
N/A
Additional Context
N/A
Enhanced "playerStateUpdate" Event Details:
With this proposed enhancement, the "playerStateUpdate" event should include the following information:
oldState: A descriptive object representing the state of the player before the change occurred.
newState: A descriptive object representing the state of the player after the change occurred.
Example Usage:
`// Example "playerStateUpdate" event usage
.on('playerStateUpdate', (oldState, newState) => {
// Check for changes related to pausing/resuming
if (oldState.paused !== newState.paused) {
if (newState.paused) {
console.log('Player was paused.');
} else {
console.log('Player was resumed.');
}
}
const loopModeChanged = oldState.queueRepeat !== newState.queueRepeat ||
oldState.trackRepeat !== newState.trackRepeat;
if (loopModeChanged) {
if (newState.queueRepeat && !newState.trackRepeat) {
// loopqueue: true and false
console.log('Loop mode changed from "track" to "queue".');
} else if (newState.trackRepeat && !newState.queueRepeat) {
// loopsong: false and true
console.log('Loop mode changed from "queue" to "track".');
}
// If both queueRepeat and trackRepeat are false, loop mode is "off"
// You can add additional logic for "off" loop mode if needed.
}
});`
Benefits:
Implementing this enhancement would provide several advantages to the erela.js community:
Conclusion:
I believe that enhancing the "playerStateUpdate" event to return only the oldState and newState objects would be a valuable improvement to erela.js. It will empower developers to create more efficient, responsive, and resource-conscious music bots.
Thank you for considering my feature request. Your dedication to refining erela.js and providing the community with an exceptional library is truly commendable. I'm excited to witness the continued growth and evolution of this project.
How do I apply filters to my music?
{ Manager: [Getter], Node: [Getter], Player: [Getter], Queue: [Getter], TrackUtils: [Getter], Structure: [Getter], Plugin: [Getter] }
Problem:
The current load-balancing system relies on CPU usage, neglecting server distribution across nodes and my other nodes in diff regions aren't used
Solution:
Implement load balancing based on server regions. Allow labeling of nodes with regions for management.
Is your feature request related to a problem? Please describe.
I've created a music bot with your library but i encounter a little problem...
I can't store if a music is a radio from us or if it one from the user
I've managed to get around this by storing in Track.requester
an object with what i've needed (radio from us or not and who asked for the music)
But with the last update, you've added type to Track.requester
(great !)
Describe the Solution You'd Like
Could you add a custom field in the Track
interface to store additional data (whatever we want so with unknown
Describe Alternatives You've Considered
For now i force things by overriding this field and "it works enough"
Additional Context
Nothing to add i think
Event Details:
The "playerStateUpdate" event would be triggered whenever there is a significant state change in the player. Specifically, it should respond with the following information:
Supported State Changes:
The event should cover the following player state updates:
Use Case:
The primary purpose of this event is to help developers handle potential timeout issues in their Discord bots. At times, due to external factors, the bot's timeout duration may be shorter than the duration of the track playing through the player. This can result in the player getting destroyed while it is actively playing music, leading to an inconsistent and unpleasant user experience.
By having access to the "playerStateUpdate" event, developers can implement custom timeout handling strategies. For example, if the bot's timeout is about to expire, they can check if the player is actively playing and, if so, extend the timeout or take appropriate actions to prevent the player from being destroyed prematurely.
Benefits:
Adding the "playerStateUpdate" event would offer the following benefits:
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.