Spotify

Is there no spotify as a defaultSearchEngine?
18 Replies
Enyz
EnyzOP•9mo ago
idk whenever I put a spotify link it will work but putting the title it will now work even tho the source is spotify or there is no spotify in the source
No description
No description
Enyz
EnyzOP•9mo ago
OH NVM, IT FEELS ILLEGAL BUT I MODIFIED THE MOONLINK IN NODE MODULES XD
HewkawAr
HewkawAr•9mo ago
Do you have the LavaSrc plugin in Lavalink?
HewkawAr
HewkawAr•9mo ago
If you already have it installed, change the source to spsearch https://github.com/topi314/LavaSrc?tab=readme-ov-file#supported-urls-and-queries
GitHub
GitHub - topi314/LavaSrc: A collection of additional Lavaplayer/Lav...
A collection of additional Lavaplayer/Lavalink Sources - topi314/LavaSrc
Enyz
EnyzOP•9mo ago
hello there, i just messed with the moonlink.js so that i will not use any plugins
Enyz
EnyzOP•9mo ago
so like i just added this
No description
Enyz
EnyzOP•9mo ago
how bout this @HewkawAr
let totalDuration = player.queue.reduce((acc, track) => acc + track.duration, 0);
let totalDuration = player.queue.reduce((acc, track) => acc + track.duration, 0);
player.queue.reduce is not a function
HewkawAr
HewkawAr•9mo ago
I think you can use it like this
const queue = player.queue.getQueue();
let totalDuration = queue.reduce((acc, track) => acc + track.duration, 0);
const queue = player.queue.getQueue();
let totalDuration = queue.reduce((acc, track) => acc + track.duration, 0);
do you have a lavalink server?
Enyz
EnyzOP•9mo ago
yes I do
HewkawAr
HewkawAr•9mo ago
Can you access the Lavalink configuration?
Enyz
EnyzOP•9mo ago
oh I mean my own lavalink? do you mean my own I lavalink?
Enyz
EnyzOP•9mo ago
lavalink hosting
List of free lavalink servers! If you have lavalink that you can share feel free to make a pull request! Lavalink is a standalone audio sending node based on Lavaplayer and JDA-Audio. Allows for sending audio without it ever reaching any of your shards.
HewkawAr
HewkawAr•9mo ago
I'm not sure if this can work, but I fetched information from it and found that the Lavasrc plugin is installed. I don't know if Spotify is enabled.
Host : lava-v4.ajieblogs.eu.org
Port : 443
Password : "https://dsc.gg/ajidevserver"
Secure : true
Host : lava-v4.ajieblogs.eu.org
Port : 443
Password : "https://dsc.gg/ajidevserver"
Secure : true
Enyz
EnyzOP•9mo ago
I need help again @HewkawAr
const queueMap = player.queue.getQueue()
if(player.queue.size > 0) queueMap.map((track) => time += track.duration)
time += player.queue.current.duration - player.position;
time -= track.duration;
trackAdded.addFields(
{ name: "Estimated time\nuntil playing", value: `${convertTime(time)}`, inline: true}
)
const queueMap = player.queue.getQueue()
if(player.queue.size > 0) queueMap.map((track) => time += track.duration)
time += player.queue.current.duration - player.position;
time -= track.duration;
trackAdded.addFields(
{ name: "Estimated time\nuntil playing", value: `${convertTime(time)}`, inline: true}
)
TypeError: Cannot read properties of null (reading 'duration')
optimistic-gold
optimistic-gold•9mo ago
try this
let time = 0;
const queueMap = player.queue.getQueue();

if (player.queue.size > 0 && queueMap) {
queueMap.forEach((track) => {
if (track && track.duration) {
time += track.duration;
}
});

if (player.queue.current && player.queue.current.duration) {
time += player.queue.current.duration - player.position;
}

trackAdded.addFields({
name: "Estimated time\nuntil playing",
value: `${convertTime(time)}`,
inline: true
});
}
let time = 0;
const queueMap = player.queue.getQueue();

if (player.queue.size > 0 && queueMap) {
queueMap.forEach((track) => {
if (track && track.duration) {
time += track.duration;
}
});

if (player.queue.current && player.queue.current.duration) {
time += player.queue.current.duration - player.position;
}

trackAdded.addFields({
name: "Estimated time\nuntil playing",
value: `${convertTime(time)}`,
inline: true
});
}
lmk if that works
Enyz
EnyzOP•9mo ago
oh thank you but im using other package "riffy"
optimistic-gold
optimistic-gold•9mo ago
if you ever have issues just put it in chatgpt ik it sounds stupid and lazy but it works
Enyz
EnyzOP•9mo ago
we same

Did you find this page helpful?