From 40b64407f2219e76010b42865c9186058a15a165 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 31 Jan 2016 09:38:16 +0100 Subject: [PATCH] gotta know if its enabled or disabled --- NadekoBot/Modules/Music.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/NadekoBot/Modules/Music.cs b/NadekoBot/Modules/Music.cs index 78b80dbc..4befb6f9 100644 --- a/NadekoBot/Modules/Music.cs +++ b/NadekoBot/Modules/Music.cs @@ -16,7 +16,7 @@ namespace NadekoBot.Modules { internal static string GetMusicStats() { var stats = musicPlayers.Where(kvp => kvp.Value?.SongQueue.Count > 0 || kvp.Value?.CurrentSong != null); int cnt; - return $"Playing {cnt = stats.Count()} songs".SnPl(cnt)+$", {stats.Sum(kvp => kvp.Value?.SongQueue?.Count ?? 0)} queued."; + return $"Playing {cnt = stats.Count()} songs".SnPl(cnt) + $", {stats.Sum(kvp => kvp.Value?.SongQueue?.Count ?? 0)} queued."; } public Music() : base() { @@ -162,7 +162,7 @@ namespace NadekoBot.Modules { player.SongQueue.Shuffle(); await e.Send(":musical_note: Songs shuffled!"); }); - bool setgameEnabled = false; + bool setgameEnabled = true; Timer setgameTimer = new Timer(); setgameTimer.Interval = 20000; setgameTimer.Elapsed += (s, e) => { @@ -172,7 +172,7 @@ namespace NadekoBot.Modules { setgameTimer.Start(); cgb.CreateCommand("setgame") .Description("Sets the game of the bot to the number of songs playing.**Owner only**") - .Do(e => { + .Do(async e => { if (NadekoBot.OwnerID != e.User.Id) return; setgameEnabled = !setgameEnabled; @@ -180,6 +180,8 @@ namespace NadekoBot.Modules { setgameTimer.Start(); else setgameTimer.Stop(); + + await e.Send("Music status " + (setgameEnabled ? "enabled" : "disabled")); }); }); }