From be02e342d915b4de8b4353a082b5a96b3f95c396 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Thu, 21 May 2020 20:32:12 -0700 Subject: fix volume error lol --- src/commands/voice/play.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands') diff --git a/src/commands/voice/play.ts b/src/commands/voice/play.ts index dfbeadb..398b431 100644 --- a/src/commands/voice/play.ts +++ b/src/commands/voice/play.ts @@ -6,6 +6,7 @@ import Youtube from 'simple-youtube-api'; import config from '../../config.json'; const youtube = new Youtube(config['yt-api-key']); import emoji from 'emoji-random'; +const volume = 100 / 100 / 25; module.exports = class PlayVoice extends Command { constructor(client) { @@ -219,6 +220,7 @@ module.exports = class PlayVoice extends Command { } playSong(queue, msg: CommandoMessage) { const classThis = this; // use classThis instead of 'this' because of lexical scope below + msg.guild.musicData.volume = volume; queue[0].voiceChannel .join() .then(function (connection) { @@ -231,8 +233,6 @@ module.exports = class PlayVoice extends Command { ) .on('start', function () { msg.guild.musicData.songDispatcher = dispatcher; - const volume = 100 / 150; - msg.guild.musicData.volume = volume; dispatcher.setVolume(msg.guild.musicData.volume); const videoEmbed = new MessageEmbed() .setThumbnail(queue[0].thumbnail) -- cgit v1.2.3