Compare commits

..

No commits in common. "9ac900bc4d435a36c8e7c7ff217c943a26a8eb0c" and "aa2ab653b9031c562041cc1de2b8f8111213ab18" have entirely different histories.

3 changed files with 42 additions and 51 deletions

View file

@ -17,8 +17,6 @@ module.exports = {
"They behave the same (for example: `<prefix>fmtt` and `<prefix>fm tt`)", "They behave the same (for example: `<prefix>fmtt` and `<prefix>fm tt`)",
"Set username: `<prefix>fmset <lastfm_username>`", "Set username: `<prefix>fmset <lastfm_username>`",
"Get current scrobble: `<prefix>fm`", "Get current scrobble: `<prefix>fm`",
"Get top artists `<prefix>fmas`",
"Get top albums: `<prefix>fmabl`",
"Get top tracks: `<prefix>fmtt`", "Get top tracks: `<prefix>fmtt`",
"Get album cover for current scrobble: `<prefix>fmcover`", "Get album cover for current scrobble: `<prefix>fmcover`",
"Get a roast from an LLM using your top artists and albums: `<prefix>fmroast`" "Get a roast from an LLM using your top artists and albums: `<prefix>fmroast`"
@ -37,19 +35,6 @@ module.exports = {
args.shift(); args.shift();
sendText = await getTopTracks(message.author.id, args, message.guild); sendText = await getTopTracks(message.author.id, args, message.guild);
break; 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": case "cover":
sendText = await getCurrentCover(message.author.id, message.guild); sendText = await getCurrentCover(message.author.id, message.guild);
break; break;

View file

@ -93,24 +93,27 @@ module.exports = async function (userID, option, guild, compatibility=false) {
}); });
}); });
} }
const embed = new EmbedBuilder() // const embed = new EmbedBuilder()
.setAuthor({name: `Top ${duration} albums for ${nickname}`, iconURL: user.user.avatarURL({ dynamic: true, size: 4096 })}) // .setAuthor({name: `Top ${duration} albums for ${nickname}`, iconURL: user.user.avatarURL({ dynamic: true, size: 4096 })})
.setColor(15780145) // .setThumbnail(albums[0].cover)
let albumInfo = ""; // .setColor(15780145)
for(let i = 0; i < albums.length; i++){ // let tracksInfo = "";
let pluralCharacter = albums[i].playcount > 1 ? 's' : ''; // for(let i = 0; i < albums.length; i++){
let album = `${i}. **${albums[i].artist}** - ${albums[i].name} - *${albums[i].playcount} play${pluralCharacter}*`; // let pluralCharacter = albums[i].playcount > 1 ? 's' : '';
if(i < albums.length - 1){ // let track = `${i}. **${albums[i].artist}** - ${albums[i].song} - *${albums[i].playcount} play${pluralCharacter}*`;
albumInfo += `${album}\n`; // if(i < albums.length - 1){
}else{ // tracksInfo += `${track}\n`;
albumInfo += `${album}`; // }else{
} // tracksInfo += `${track}`;
} // }
embed.setDescription(albumInfo); // }
sendText.embed = embed; // embed.addFields({
if(compatibility) // name: ` `, value: `${tracksInfo}`
// },)
// sendText.embed = embed;
// if(compatibility)
return albums; return albums;
else // else
return sendText; // return sendText;
} }

View file

@ -92,24 +92,27 @@ module.exports = async function (userID, option, guild, compatibility=false) {
}); });
}); });
} }
const embed = new EmbedBuilder() // const embed = new EmbedBuilder()
.setAuthor({name: `Top ${duration} artists for ${nickname}`, iconURL: user.user.avatarURL({ dynamic: true, size: 4096 })}) // .setAuthor({name: `Top ${duration} tracks for ${nickname}`, iconURL: user.user.avatarURL({ dynamic: true, size: 4096 })})
.setColor(15780145) // .setThumbnail(tracks[0].cover)
let artistsInfo = ""; // .setColor(15780145)
for(let i = 0; i < artists.length; i++){ // let tracksInfo = "";
let pluralCharacter = artists[i].playcount > 1 ? 's' : ''; // for(let i = 0; i < tracks.length; i++){
let track = `${i}. **${artists[i].name}** - *${artists[i].playcount} play${pluralCharacter}*`; // let pluralCharacter = tracks[i].playcount > 1 ? 's' : '';
if(i < artists.length - 1){ // let track = `${i}. **${tracks[i].artist}** - ${tracks[i].song} - *${tracks[i].playcount} play${pluralCharacter}*`;
artistsInfo += `${track}\n`; // if(i < tracks.length - 1){
}else{ // tracksInfo += `${track}\n`;
artistsInfo += `${track}`; // }else{
} // tracksInfo += `${track}`;
} // }
embed.setDescription(artistsInfo); // }
sendText.embed = embed; // embed.addFields({
if(compatibility) // name: ` `, value: `${tracksInfo}`
// },)
// sendText.embed = embed;
// if(compatibility)
return artists; return artists;
else // else
return sendText; // return sendText;
} }