parent
a066fd0662
commit
e511b03acf
4 changed files with 278 additions and 1 deletions
|
@ -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 = getTopArtists(message.author.id, ["yearly"], message.guild, true);
|
||||
let topAlbums = 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));
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue