1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-22 21:13:18 +00:00

Update index.js

This commit is contained in:
MatteZ02 2019-05-31 21:38:53 +03:00
parent 43b71ddb69
commit bd3008c072

View File

@ -151,7 +151,7 @@ Please provide a value to select one of the search results ranging from __1-10__
if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing.');
if (!args[1]) return msg.channel.send(`The current volume is: **${serverQueue.volume}** :speaker:`); if (!args[1]) return msg.channel.send(`The current volume is: **${serverQueue.volume}** :speaker:`);
serverQueue.volume = args[1]; serverQueue.volume = args[1];
serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 1); serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 5);
return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`); return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`);
} else if (command === 'np') { } else if (command === 'np') {
if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing.');
@ -261,7 +261,7 @@ Please provide a value to select one of the search results ranging from __1-10__
if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing.');
if (!args[1]) return msg.channel.send(`The current volume is: **${serverQueue.volume}** :speaker:`); if (!args[1]) return msg.channel.send(`The current volume is: **${serverQueue.volume}** :speaker:`);
serverQueue.volume = args[1]; serverQueue.volume = args[1];
serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 1); serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 5);
return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`); return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`);
} else if (command === 'np') { } else if (command === 'np') {
if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing.');
@ -351,7 +351,7 @@ function play(guild, song) {
play(guild, serverQueue.songs[0]); play(guild, serverQueue.songs[0]);
}) })
.on('error', error => console.error(error)); .on('error', error => console.error(error));
dispatcher.setVolumeLogarithmic(serverQueue.volume / 1); dispatcher.setVolumeLogarithmic(1 / 5);
serverQueue.textChannel.send(`:musical_note: Start playing: **${song.title}**`); serverQueue.textChannel.send(`:musical_note: Start playing: **${song.title}**`);
} }