Merge branch 'devbot' into discordjs-v14-upgrade
This commit is contained in:
commit
de27168908
10 changed files with 230 additions and 31 deletions
25
commands/misc/fm.js
Normal file
25
commands/misc/fm.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
const fmlogin = require("../../util/lastfm/fmlogin");
|
||||
const displayCurrentScrobble = require("../../util/lastfm/displayCurrentScrobble");
|
||||
|
||||
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;
|
||||
}
|
||||
if(args.length < 1){
|
||||
sendText = await displayCurrentScrobble(message.author.id);
|
||||
}
|
||||
message.channel.send(sendText);
|
||||
}
|
||||
};
|
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
return;
|
||||
}else{
|
||||
setServerPrefix(client, args[0], message.guild.id)
|
||||
message.channel.send(`The prefix for this server is now set to ${args[0]}`)
|
||||
message.channel.send(`The prefix for this server is now set to ${args[0]}\nIf for some reason you are unable to use the new prefix, you can mention the bot as a prefix instead`);
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue