hasselhoff
hasselhoff
DIAdiscord.js - Imagine an app
Created by hasselhoff on 5/8/2025 in #djs-questions
How can I get information about a member's clan tag?
oh...
5 replies
DIAdiscord.js - Imagine an app
Created by hasselhoff on 5/8/2025 in #djs-questions
How can I get information about a member's clan tag?
djs 14.19.2
5 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
yes
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
Better host your own
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
I have my own
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
How is that?
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
I always assigned the numbers myself
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
I have never used it
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
This function converts the timestamp given by moonlink to normal time.
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
like this
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
const position = currentTrack?.position || 0;
const currentTrackLength = currentTrack?.duration || 0;
const progress = currentTrackLength ? position / currentTrackLength : 0;


Write this code in your player menu, to show current time: ${progressBar} — ${convertTime(position, true)} / ${convertTime(currentTrackLength, true
const position = currentTrack?.position || 0;
const currentTrackLength = currentTrack?.duration || 0;
const progress = currentTrackLength ? position / currentTrackLength : 0;


Write this code in your player menu, to show current time: ${progressBar} — ${convertTime(position, true)} / ${convertTime(currentTrackLength, true
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
this is my func to get track time:
module.exports = {
convertTime: function (duration) {
var milliseconds = parseInt((duration % 1000) / 100),
seconds = parseInt((duration / 1000) % 60),
minutes = parseInt((duration / (1000 * 60)) % 60),
hours = parseInt((duration / (1000 * 60 * 60)) % 24);

hours = hours < 10 ? "0" + hours : hours;
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;

if (duration < 3600000) {
return minutes + ":" + seconds;
} else {
return hours + ":" + minutes + ":" + seconds;
}
},

convertNumber: function (number, decPlaces) {
decPlaces = Math.pow(10, decPlaces);

var abbrev = ["K", "M", "B", "T"];

for (var i = abbrev.length - 1; i >= 0; i--) {
var size = Math.pow(10, (i + 1) * 3);

if (size <= number) {
number = Math.round((number * decPlaces) / size) / decPlaces;

if (number == 1000 && i < abbrev.length - 1) {
number = 1;
i++;
}

number += abbrev[i];

break;
}
}

return number;
},

chunk: function (arr, size) {
const temp = [];
for (let i = 0; i < arr.length; i += size) {
temp.push(arr.slice(i, i + size));
}
return temp;
},

convertHmsToMs: function (hms) {
var p = hms.trim().replace(/[. -]/g, ":").split(":"), // allow dots '.', spaces ' ' and hyphens '-' the same way as colons ':'
s = 0,
m = 1;

while (p.length > 0) {
s += m * parseInt(p.pop(), 10);
m *= 60;
}
return s * 1000;
},
};
module.exports = {
convertTime: function (duration) {
var milliseconds = parseInt((duration % 1000) / 100),
seconds = parseInt((duration / 1000) % 60),
minutes = parseInt((duration / (1000 * 60)) % 60),
hours = parseInt((duration / (1000 * 60 * 60)) % 24);

hours = hours < 10 ? "0" + hours : hours;
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;

if (duration < 3600000) {
return minutes + ":" + seconds;
} else {
return hours + ":" + minutes + ":" + seconds;
}
},

convertNumber: function (number, decPlaces) {
decPlaces = Math.pow(10, decPlaces);

var abbrev = ["K", "M", "B", "T"];

for (var i = abbrev.length - 1; i >= 0; i--) {
var size = Math.pow(10, (i + 1) * 3);

if (size <= number) {
number = Math.round((number * decPlaces) / size) / decPlaces;

if (number == 1000 && i < abbrev.length - 1) {
number = 1;
i++;
}

number += abbrev[i];

break;
}
}

return number;
},

chunk: function (arr, size) {
const temp = [];
for (let i = 0; i < arr.length; i += size) {
temp.push(arr.slice(i, i + size));
}
return temp;
},

convertHmsToMs: function (hms) {
var p = hms.trim().replace(/[. -]/g, ":").split(":"), // allow dots '.', spaces ' ' and hyphens '-' the same way as colons ':'
s = 0,
m = 1;

while (p.length > 0) {
s += m * parseInt(p.pop(), 10);
m *= 60;
}
return s * 1000;
},
};
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
No description
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
а
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
But it worked very crookedly and that's why I removed it and just made numbers from 1-5 in the player itself
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
I used to assign each track its own number when uploading.
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
By default this function is not there and you have to implement it yourself somehow
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
Do you want to add a function that will show the number of the next tracks?
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
And it seems like the GuildMember object is simply stored there, and try logging track.requestedBy
48 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by Nonsen on 5/6/2025 in #help
TypeError: Cannot read properties of undefined (reading 'encoded') on skip function
This is a useless feature and I advise you to remove it because no one uses it.
48 replies