autoplay is canceled on !m s, fixed music commandlist

This commit is contained in:
Master Kwoth
2016-07-04 20:16:12 +02:00
parent d264000ea7
commit b83e1d74f8
4 changed files with 38 additions and 35 deletions

View File

@ -79,7 +79,7 @@ namespace NadekoBot.Modules.Administration
});
cgb.CreateCommand(Prefix + "restart")
.Description("Restarts the bot. Might not work.")
.Description("Restarts the bot. Might not work. **Bot Owner Only**")
.AddCheck(SimpleCheckers.OwnerOnly())
.Do(async e =>
{

View File

@ -50,7 +50,7 @@ namespace NadekoBot.Modules.Music.Classes
private bool Destroyed { get; set; } = false;
public bool RepeatSong { get; private set; } = false;
public bool RepeatPlaylist { get; private set; } = false;
public bool Autoplay { get; private set; } = false;
public bool Autoplay { get; set; } = false;
public MusicPlayer(Channel startingVoiceChannel, float? defaultVolume)
{

View File

@ -58,7 +58,10 @@ namespace NadekoBot.Modules.Music
MusicPlayer musicPlayer;
if (!MusicPlayers.TryGetValue(e.Server, out musicPlayer)) return;
if (e.User.VoiceChannel == musicPlayer.PlaybackVoiceChannel)
{
musicPlayer.Autoplay = false;
musicPlayer.Stop();
}
});
cgb.CreateCommand("destroy")