From ca658ae55ca18e4e5f0a51d1ed67ace2bf66607f Mon Sep 17 00:00:00 2001 From: samvaio Date: Fri, 23 Dec 2016 09:20:49 +0530 Subject: [PATCH] volume added to playing --- src/NadekoBot/Modules/Music/Music.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index d1d7f7ff..3a005a71 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -867,6 +867,9 @@ namespace NadekoBot.Modules.Music mp.OnStarted += async (player, song) => { try { await mp.UpdateSongDurationsAsync().ConfigureAwait(false); } catch { } + var sender = player as MusicPlayer; + if (sender == null) + return; try { if (playingMessage != null) @@ -874,8 +877,8 @@ namespace NadekoBot.Modules.Music playingMessage = await textCh.EmbedAsync(new EmbedBuilder().WithOkColor() .WithAuthor(eab => eab.WithName("Playing Song").WithMusicIcon()) - .WithDescription(song.PrettyName) - .WithFooter(ef => ef.WithText(song.PrettyInfo)) + .WithDescription($"{song.PrettyName}") + .WithFooter(ef => ef.WithText($"🔉 {(int)(sender.Volume * 100)}% | {song.PrettyInfo}")) .Build()) .ConfigureAwait(false); } @@ -937,4 +940,4 @@ namespace NadekoBot.Modules.Music } } } -} +} \ No newline at end of file