Add fm set username command

Beginning of the command. Can't do anything other than setting and
updating your lastfm username.
This commit is contained in:
SileNce5k 2024-03-04 12:01:11 +01:00
parent bdc08b3153
commit 8c02dc5517
No known key found for this signature in database
GPG key ID: 961132EB78C8915F
4 changed files with 109 additions and 0 deletions

21
commands/misc/fm.js Normal file
View file

@ -0,0 +1,21 @@
const fmlogin = require("../../util/lastfm/fmlogin");
module.exports = {
name: 'fm',
description: 'Last fm commands. See `<prefix>help fm` for more info.',
moreHelp: ["Set username: `<prefix>fm set <lastfm_username>`",],
async execute({ message, args }) {
let sendText = "Something went wrong.";
switch (args[0]) {
case "help":
sendText = this.moreHelp;
break;
case "set":
sendText = await fmlogin(message.author.id, args[1]);
break;
default:
break;
}
message.channel.send(sendText);
}
};