temp
All checks were successful
CI / CI (push) Successful in 1m21s

This commit is contained in:
SileNce5k 2025-04-30 19:48:33 +02:00
parent a066fd0662
commit 5ef9146a30
Signed by: SileNce
GPG key ID: B0A142BB4291B204
4 changed files with 290 additions and 1 deletions

View file

@ -4,6 +4,9 @@ const getCurrentCover = require("../../util/lastfm/getCurrentCover");
const getTopTracks = require("../../util/lastfm/getTopTracks");
const help = require("../info/help");
const parseMention = require("../../util/parseMention");
const roast = require("../../util/lastfm/roast");
const getTopArtists = require("../../util/lastfm/getTopArtists");
const getTopAlbums = require("../../util/lastfm/getTopAlbums");
module.exports = {
name: 'fm',
description: 'Last fm commands. See `<prefix>help fm` for more info.',
@ -13,6 +16,7 @@ module.exports = {
"Get current scrobble: `<prefix>fm`",
"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`"
],
async execute({ message, args, prefix, client }) {
let sendText = {text: "Something went wrong.", embed: null};
@ -31,6 +35,14 @@ module.exports = {
case "cover":
sendText = await getCurrentCover(message.author.id, message.guild);
break;
case "roast":
let topArtists = await getTopArtists(message.author.id, ["yearly"], message.guild, true);
let topAlbums = await getTopAlbums(message.author.id, ["yearly"], message.guild, true);
console.log(topAlbums);
console.log(topArtists);
sendText = {embed: null, text: "meep"};
sendText = await roast(topArtists, topAlbums);
break;
default:
sendText.text = `${args[0]} is not a valid subcommand.\nSee \`${prefix}help fm\` for more info.`;
break;
@ -51,4 +63,4 @@ module.exports = {
message.channel.send(sendText.text.replaceAll("<prefix>", prefix));
}
}
};
};