1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 16:13:18 +00:00
musix-oss/commands/settings/bass.js

14 lines
644 B
JavaScript
Raw Normal View History

2020-03-03 20:24:41 +00:00
module.exports = {
name: 'bass',
async execute(msg, args, client, Discord, prefix) {
2020-03-12 11:56:31 +00:00
if (!args[2]) return msg.channel.send(client.messages.currentDefaultBass + client.global.db.guilds[msg.guild.id].bass);
2020-03-03 20:24:41 +00:00
if (args[2] === "false") {
client.global.db.guilds[msg.guild.id].bass = false;
2020-03-12 11:56:31 +00:00
msg.channel.send(client.messages.bassFalse);
2020-03-03 20:24:41 +00:00
}
const level = parseInt(args[2]);
2020-03-12 11:56:31 +00:00
if (isNaN(level)) return msg.channel.send(client.messages.validNumber);
2020-03-03 20:24:41 +00:00
client.global.db.guilds[msg.guild.id].bass = level;
2020-03-12 11:56:31 +00:00
msg.channel.send(`${client.messages.bassLevel} ${level}!`);
2020-03-03 20:24:41 +00:00
}
};