Use correct variables
All checks were successful
CI / CI (push) Successful in 22s

This commit is contained in:
SileNce5k 2025-09-07 08:01:09 +02:00
commit f1f9e3aaa3
Signed by: SileNce
GPG key ID: B0A142BB4291B204
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ module.exports = async function (userID, option, guild, compatibility=false) {
fetch(`https://ws.audioscrobbler.com/2.0/?method=user.gettoptracks&user=${lastfmUsername}&period=${option[0]}&api_key=${apiKey}&format=json`)
.then(response => response.json())
.then(data => {
const maxIterations = data.topartists.artist.length >= 10 ? 10 : data.topartists.artist.length;
const maxIterations = data.toptracks.track.length >= 10 ? 10 : data.toptracks.track.length;
for(let i = 0; i < maxIterations; i++){
let track = {}
let currentTrack = data.toptracks.track[i];