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

removed src

This commit is contained in:
MatteZ02
2020-02-10 21:08:46 +02:00
parent f28c2fcd77
commit ee246734aa
48 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
module.exports = {
name: 'announcesongs',
async execute(msg, args, client, Discord, prefix) {
if (client.global.db.guilds[msg.guild.id].startPlaying) {
client.global.db.guilds[msg.guild.id].startPlaying = false;
return msg.channel.send('<:green_check_mark:674265384777416705> announcesongs now set to `false`!');
} else {
client.global.db.guilds[msg.guild.id].startPlaying = true;
return msg.channel.send('<:green_check_mark:674265384777416705> announcesongs now set to `true`!');
}
}
};

View File

@ -0,0 +1,17 @@
module.exports = {
name: 'permissions',
async execute(msg, args, client, Discord, prefix) {
if (!args[2]) return msg.channel.send(`🔒 Permission requirement: \`${client.global.db.guilds[msg.guild.id].permissions}\``);
if (args[2] === 'true') {
if (!client.global.db.guilds[msg.guild.id].permissions) {
client.global.db.guilds[msg.guild.id].permissions = true;
msg.channel.send(`<:green_check_mark:674265384777416705> Permissions requirement now set to: \`true\``);
} else return msg.channel.send('<:redx:674263474704220182> That value is already `true`!');
} else if (args[2] === 'false') {
if (client.global.db.guilds[msg.guild.id].permissions) {
client.global.db.guilds[msg.guild.id].permissions = false;
msg.channel.send(`<:green_check_mark:674265384777416705> Permissions requirement now set to: \`false\``);
} else return msg.channel.send('<:redx:674263474704220182> That value is already `false`!');
} else return msg.channel.send('<:redx:674263474704220182> Please define a boolean! (true/false)');
}
};

View File

@ -0,0 +1,8 @@
module.exports = {
name: 'prefix',
async execute(msg, args, client, Discord, prefix) {
if (!args[2]) return msg.channel.send(`Current prefix: \`${client.global.db.guilds[msg.guild.id].prefix}\``);
client.global.db.guilds[msg.guild.id].prefix = args[2];
msg.channel.send(`<:green_check_mark:674265384777416705> New prefix set to: \`${args[2]}\``);
}
};

View File

@ -0,0 +1,14 @@
module.exports = {
name: 'reset',
async execute(msg, args, client, Discord, prefix) {
client.global.db.guilds[msg.guild.id] = {
prefix: client.config.prefix,
defaultVolume: 5,
permissions: false,
premium: false,
dj: false,
djrole: null
};
msg.channel.send('<:green_check_mark:674265384777416705> Reset __all__ guild settings!');
}
};

View File

@ -0,0 +1,28 @@
module.exports = {
name: 'setdj',
async execute(msg, args, client, Discord, prefix) {
if (!client.global.db.guilds[msg.guild.id].dj) {
if (!client.global.db.guilds[msg.guild.id].permissions) {
client.global.db.guilds[msg.guild.id].permissions = true;
}
if (msg.guild.roles.find(x => x.name === "DJ")) {
client.global.db.guilds[msg.guild.id].djrole = msg.guild.roles.find(x => x.name === "DJ").id;
msg.channel.send('<:green_check_mark:674265384777416705> I found a `DJ` role from this guild! This role is now the DJ role.');
client.global.db.guilds[msg.guild.id].dj = true;
} else {
const permissions = msg.channel.permissionsFor(msg.client.user);
if (!permissions.has('MANAGE_ROLES')) return msg.channel.send('<:redx:674263474704220182> I cannot create roles (Manage roles), make sure I have the proper permissions! I will need this permission to create a `DJ` role since i did not find one!');
msg.guild.createRole({
name: 'DJ',
})
.then(role => client.global.db.guilds[msg.guild.id].djrole = role.id)
.catch(console.error)
client.global.db.guilds[msg.guild.id].dj = true;
msg.channel.send('<:green_check_mark:674265384777416705> I did not find a role `DJ` so i have created one for you!');
}
} else {
client.global.db.guilds[msg.guild.id].dj = false;
msg.channel.send('<:green_check_mark:674265384777416705> `DJ` now set to `false`');
}
}
};

View File

@ -0,0 +1,10 @@
module.exports = {
name: 'volume',
async execute(msg, args, client, Discord, prefix) {
if (!args[2]) return msg.channel.send(`:speaker: Current default volume is: \`${client.global.db.guilds[msg.guild.id].defaultVolume}\``);
if (isNaN(args[2])) return msg.channel.send('<:redx:674263474704220182> I\'m sorry, But the default volume needs to be a valid __number__.');
if (args[2].length > 2) return msg.channel.send('<:redx:674263474704220182> The default volume must be below `100` for quality and safety resons.');
client.global.db.guilds[msg.guild.id].defaultVolume = args[2];
msg.channel.send(`<:green_check_mark:674265384777416705> Default volume set to: \`${args[2]}\``);
}
};