2020-04-24 07:50:54 +00:00
|
|
|
// Copyright 2020 Emily J. / mudkipscience and contributors. Subject to the AGPLv3 license.
|
|
|
|
|
|
|
|
exports.conf = {
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: true,
|
|
|
|
aliases: [],
|
|
|
|
permLevel: 'Administrator',
|
|
|
|
requiredPerms: [],
|
|
|
|
cooldown: 5000 // miliseconds
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.help = {
|
|
|
|
name: 'defaultvolume',
|
|
|
|
category: 'Music',
|
|
|
|
description: 'Change the default volume Woomy plays music at.',
|
|
|
|
usage: 'volume [volume]',
|
|
|
|
params: '[volume] - what you want to set the default volume to'
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.run = async (client, message, args, level, data) => {
|
2020-04-26 08:04:19 +00:00
|
|
|
if (!args[0]) {
|
|
|
|
return message.channel.send(`Current default volume: \`${data.guild.music.defaultVolume}\``)
|
2020-04-24 07:50:54 +00:00
|
|
|
}
|
|
|
|
|
2020-04-26 08:04:19 +00:00
|
|
|
if (args[0].toLowerCase() === 'reset') {
|
2020-04-24 07:50:54 +00:00
|
|
|
await client.updateGuild(message.guild, { prefix: client.config.defaultPrefix })
|
|
|
|
return message.channel.send('Server prefix has been reset.')
|
|
|
|
}
|
|
|
|
|
2020-04-26 08:04:19 +00:00
|
|
|
const vol = +args[0]
|
|
|
|
|
|
|
|
if (isNaN(vol) === true) {
|
|
|
|
return message.channel.send('new volume must be a number')
|
|
|
|
}
|
|
|
|
|
|
|
|
await client.updateGuild(message.guild, { music.defaultVoume: vol })
|
2020-04-24 07:50:54 +00:00
|
|
|
|
|
|
|
message.channel.send(`The server prefix has been updated: \`${prefix}\``)
|
|
|
|
}
|