Fixed current volume message in volume.js

This commit is contained in:
Christer Warén 2020-03-13 01:04:05 +02:00
parent 83a535d581
commit 58accb21e5

View File

@ -8,8 +8,11 @@ module.exports = {
execute(msg, args, client, Discord, prefix, command) { execute(msg, args, client, Discord, prefix, command) {
let message = {}; let message = {};
const radio = client.radio.get(msg.guild.id); const radio = client.radio.get(msg.guild.id);
/*message.currentVolume = client.messages.currentVolume.replace("%radio.volume%", radio.volume)*/
if (!args[1] && radio) return msg.channel.send(client.messages.currentVolume); if (!args[1] && radio) {
message.currentVolume = client.messages.currentVolume.replace("%radio.volume%", radio.volume)
return msg.channel.send(message.currentVolume);
}
const volume = parseFloat(args[1]); const volume = parseFloat(args[1]);
if (client.funcs.check(client, msg, command)) { if (client.funcs.check(client, msg, command)) {
if (isNaN(volume)) return msg.channel.send(client.messages.invalidVolume); if (isNaN(volume)) return msg.channel.send(client.messages.invalidVolume);
@ -21,4 +24,4 @@ module.exports = {
return msg.channel.send(message.newVolume); return msg.channel.send(message.newVolume);
} }
} }
}; };