Merge branch 'devbot' into discordjs-v14-upgrade

This commit is contained in:
SileNce5k 2024-03-04 13:07:20 +01:00
commit de27168908
No known key found for this signature in database
GPG key ID: 961132EB78C8915F
10 changed files with 230 additions and 31 deletions

25
commands/misc/fm.js Normal file
View 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);
}
};

View file

@ -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`);
}
}
};