diff --git a/commands/misc/fm.js b/commands/misc/fm.js index 5aa6035..8d07401 100644 --- a/commands/misc/fm.js +++ b/commands/misc/fm.js @@ -17,8 +17,6 @@ module.exports = { "They behave the same (for example: `fmtt` and `fm tt`)", "Set username: `fmset `", "Get current scrobble: `fm`", - "Get top artists `fmas`", - "Get top albums: `fmabl`", "Get top tracks: `fmtt`", "Get album cover for current scrobble: `fmcover`", "Get a roast from an LLM using your top artists and albums: `fmroast`" @@ -37,19 +35,6 @@ module.exports = { args.shift(); sendText = await getTopTracks(message.author.id, args, message.guild); break; - case "topalbums": - case "topalbum": - case "abl": - args.shift(); - sendText = await getTopAlbums(message.author.id, args, message.guild) - break; - case "topartists": - case "topartist": - case "ta": - case "as": - args.shift(); - sendText = await getTopArtists(message.author.id, args, message.guild); - break; case "cover": sendText = await getCurrentCover(message.author.id, message.guild); break; diff --git a/util/lastfm/getTopAlbums.js b/util/lastfm/getTopAlbums.js index b87a403..049393d 100644 --- a/util/lastfm/getTopAlbums.js +++ b/util/lastfm/getTopAlbums.js @@ -93,24 +93,27 @@ module.exports = async function (userID, option, guild, compatibility=false) { }); }); } - const embed = new EmbedBuilder() - .setAuthor({name: `Top ${duration} albums for ${nickname}`, iconURL: user.user.avatarURL({ dynamic: true, size: 4096 })}) - .setColor(15780145) - let albumInfo = ""; - for(let i = 0; i < albums.length; i++){ - let pluralCharacter = albums[i].playcount > 1 ? 's' : ''; - let album = `${i}. **${albums[i].artist}** - ${albums[i].name} - *${albums[i].playcount} play${pluralCharacter}*`; - if(i < albums.length - 1){ - albumInfo += `${album}\n`; - }else{ - albumInfo += `${album}`; - } - } - embed.setDescription(albumInfo); - sendText.embed = embed; - if(compatibility) + // const embed = new EmbedBuilder() + // .setAuthor({name: `Top ${duration} albums for ${nickname}`, iconURL: user.user.avatarURL({ dynamic: true, size: 4096 })}) + // .setThumbnail(albums[0].cover) + // .setColor(15780145) + // let tracksInfo = ""; + // for(let i = 0; i < albums.length; i++){ + // let pluralCharacter = albums[i].playcount > 1 ? 's' : ''; + // let track = `${i}. **${albums[i].artist}** - ${albums[i].song} - *${albums[i].playcount} play${pluralCharacter}*`; + // if(i < albums.length - 1){ + // tracksInfo += `${track}\n`; + // }else{ + // tracksInfo += `${track}`; + // } + // } + // embed.addFields({ + // name: ` `, value: `${tracksInfo}` + // },) + // sendText.embed = embed; + // if(compatibility) return albums; - else - return sendText; + // else + // return sendText; } \ No newline at end of file diff --git a/util/lastfm/getTopArtists.js b/util/lastfm/getTopArtists.js index 40cbe3f..2318180 100644 --- a/util/lastfm/getTopArtists.js +++ b/util/lastfm/getTopArtists.js @@ -92,24 +92,27 @@ module.exports = async function (userID, option, guild, compatibility=false) { }); }); } - const embed = new EmbedBuilder() - .setAuthor({name: `Top ${duration} artists for ${nickname}`, iconURL: user.user.avatarURL({ dynamic: true, size: 4096 })}) - .setColor(15780145) - let artistsInfo = ""; - for(let i = 0; i < artists.length; i++){ - let pluralCharacter = artists[i].playcount > 1 ? 's' : ''; - let track = `${i}. **${artists[i].name}** - *${artists[i].playcount} play${pluralCharacter}*`; - if(i < artists.length - 1){ - artistsInfo += `${track}\n`; - }else{ - artistsInfo += `${track}`; - } - } - embed.setDescription(artistsInfo); - sendText.embed = embed; - if(compatibility) + // const embed = new EmbedBuilder() + // .setAuthor({name: `Top ${duration} tracks for ${nickname}`, iconURL: user.user.avatarURL({ dynamic: true, size: 4096 })}) + // .setThumbnail(tracks[0].cover) + // .setColor(15780145) + // let tracksInfo = ""; + // for(let i = 0; i < tracks.length; i++){ + // let pluralCharacter = tracks[i].playcount > 1 ? 's' : ''; + // let track = `${i}. **${tracks[i].artist}** - ${tracks[i].song} - *${tracks[i].playcount} play${pluralCharacter}*`; + // if(i < tracks.length - 1){ + // tracksInfo += `${track}\n`; + // }else{ + // tracksInfo += `${track}`; + // } + // } + // embed.addFields({ + // name: ` `, value: `${tracksInfo}` + // },) + // sendText.embed = embed; + // if(compatibility) return artists; - else - return sendText; + // else + // return sendText; } \ No newline at end of file