mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-16 12:36:01 +00:00
updated all commands and removed some weird files
This commit is contained in:
27
commands/settings.js
Normal file
27
commands/settings.js
Normal file
@ -0,0 +1,27 @@
|
||||
module.exports = {
|
||||
name: 'settings',
|
||||
usage: '[setting]',
|
||||
description: 'Change the settings',
|
||||
cooldown: 5,
|
||||
async execute(message, args, client, RichEmbed, prefix) {
|
||||
const permissions = message.channel.permissionsFor(message.author);
|
||||
if (message.author.id !== '360363051792203779') {
|
||||
if (!permissions.has('MANAGE_GUILD')) return message.channel.send(':x: You need the `MANAGE_SERVER` permission to change the settings!');
|
||||
}
|
||||
if (!args[1]) {
|
||||
const embed = new RichEmbed()
|
||||
.setTitle('Guild settings for Musix')
|
||||
.addField('prefix', 'Change the guild specific prefix.', true)
|
||||
.setFooter(`how to use: ${prefix}settings <Setting name> <value>`)
|
||||
.setAuthor(client.user.username, client.user.displayAvatarURL)
|
||||
.setColor('#b50002')
|
||||
return message.channel.send(embed);
|
||||
}
|
||||
if (args[1] === 'prefix') {
|
||||
if (!args[2]) return message.channel.send(':x: You need to define the prefix!');
|
||||
if (args[2].length > 5) return message.channel.send(':x: The prefix must be less than or equal to 5 characters');
|
||||
await client.setPrefix(args[2], message.guild.id);
|
||||
message.channel.send(`:white_check_mark: New prefix set: \`${args[2]}\`\n${client.global.replies.fiveMinutes}`);
|
||||
}
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user