Compare commits
No commits in common. "9ac900bc4d435a36c8e7c7ff217c943a26a8eb0c" and "aa2ab653b9031c562041cc1de2b8f8111213ab18" have entirely different histories.
9ac900bc4d
...
aa2ab653b9
3 changed files with 42 additions and 51 deletions
|
@ -17,8 +17,6 @@ module.exports = {
|
|||
"They behave the same (for example: `<prefix>fmtt` and `<prefix>fm tt`)",
|
||||
"Set username: `<prefix>fmset <lastfm_username>`",
|
||||
"Get current scrobble: `<prefix>fm`",
|
||||
"Get top artists `<prefix>fmas`",
|
||||
"Get top albums: `<prefix>fmabl`",
|
||||
"Get top tracks: `<prefix>fmtt`",
|
||||
"Get album cover for current scrobble: `<prefix>fmcover`",
|
||||
"Get a roast from an LLM using your top artists and albums: `<prefix>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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -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;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue