gotta know if its enabled or disabled
This commit is contained in:
parent
e71e390cca
commit
40b64407f2
@ -162,7 +162,7 @@ namespace NadekoBot.Modules {
|
|||||||
player.SongQueue.Shuffle();
|
player.SongQueue.Shuffle();
|
||||||
await e.Send(":musical_note: Songs shuffled!");
|
await e.Send(":musical_note: Songs shuffled!");
|
||||||
});
|
});
|
||||||
bool setgameEnabled = false;
|
bool setgameEnabled = true;
|
||||||
Timer setgameTimer = new Timer();
|
Timer setgameTimer = new Timer();
|
||||||
setgameTimer.Interval = 20000;
|
setgameTimer.Interval = 20000;
|
||||||
setgameTimer.Elapsed += (s, e) => {
|
setgameTimer.Elapsed += (s, e) => {
|
||||||
@ -172,7 +172,7 @@ namespace NadekoBot.Modules {
|
|||||||
setgameTimer.Start();
|
setgameTimer.Start();
|
||||||
cgb.CreateCommand("setgame")
|
cgb.CreateCommand("setgame")
|
||||||
.Description("Sets the game of the bot to the number of songs playing.**Owner only**")
|
.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)
|
if (NadekoBot.OwnerID != e.User.Id)
|
||||||
return;
|
return;
|
||||||
setgameEnabled = !setgameEnabled;
|
setgameEnabled = !setgameEnabled;
|
||||||
@ -180,6 +180,8 @@ namespace NadekoBot.Modules {
|
|||||||
setgameTimer.Start();
|
setgameTimer.Start();
|
||||||
else
|
else
|
||||||
setgameTimer.Stop();
|
setgameTimer.Stop();
|
||||||
|
|
||||||
|
await e.Send("Music status " + (setgameEnabled ? "enabled" : "disabled"));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user