2019-10-31 18:29:26 +00:00
|
|
|
module.exports = {
|
|
|
|
name: 'volume',
|
2024-02-09 09:53:30 +00:00
|
|
|
async execute(message, args, client, prefix) {
|
2019-10-31 18:29:26 +00:00
|
|
|
if (!args[2]) return message.channel.send(`:speaker: Current default volume is: \`${client.global.db.guilds[message.guild.id].defaultVolume}\``);
|
|
|
|
if (isNaN(args[2])) return message.channel.send(':x: I\'m sorry, But the default volume needs to be a valid __number__.');
|
|
|
|
if (args[2].length > 2) return message.channel.send(':x: The default volume must be below `100` for quality and safety resons.');
|
|
|
|
client.global.db.guilds[message.guild.id].defaultVolume = args[2];
|
|
|
|
message.channel.send(`:white_check_mark: Default volume set to: \`${args[2]}\``);
|
|
|
|
}
|
2024-02-09 09:53:30 +00:00
|
|
|
};
|