1
0
mirror of https://github.com/musix-org/musix-oss synced 2025-06-16 12:36:01 +00:00

Updated everything

This commit is contained in:
MatteZ02
2019-09-15 09:18:33 +03:00
parent 9d7e55b5ee
commit e4e99d76c9
1064 changed files with 277 additions and 171372 deletions

View File

@ -2,13 +2,18 @@ module.exports = {
name: 'settings',
usage: '[setting]',
description: 'Change the settings',
cooldown: 5,
cooldown: 10,
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]) {
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 to: \`${args[2]}\`\n`);
} else {
const embed = new RichEmbed()
.setTitle('Guild settings for Musix')
.addField('prefix', 'Change the guild specific prefix.', true)
@ -17,11 +22,5 @@ module.exports = {
.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}`);
}
},
};