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:
parent
bdc08b3153
commit
8c02dc5517
4 changed files with 109 additions and 0 deletions
21
commands/misc/fm.js
Normal file
21
commands/misc/fm.js
Normal 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);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue