Lanbot_Music_V12/commands/Admin/config.js

20 lines
703 B
JavaScript
Raw Normal View History

2022-01-04 02:35:59 +01:00
const { MESSAGES } = require("../../util/constants");
module.exports.run = async (client, message, args, settings) => {
const getSetting = args[0];
const newSetting = args.slice(1).join(" ");
//const newLogSetting = args.slice(2, -1);
switch(getSetting) {
case "prefix": {
if (newSetting) {
await client.updateGuild(message.guild, { prefix: newSetting });
return message.channel.send(`Prefix mis à jour: \`${settings.prefix}\`-> \`${newSetting}\``);
}
message.channel.send(`Prefix actuel: \`${settings.prefix}\``);
break;
}
}
};
module.exports.help = MESSAGES.COMMANDS.ADMIN.CONFIG;