.move fixed, but it will cancel current song when moving
This commit is contained in:
parent
b33e4bdd80
commit
322424b0a1
@ -120,7 +120,7 @@ namespace NadekoBot.Modules.Music
|
||||
}
|
||||
}
|
||||
}
|
||||
//todo test play
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public Task Play([Remainder]string query = null)
|
||||
@ -722,7 +722,7 @@ namespace NadekoBot.Modules.Music
|
||||
|
||||
if (mp == null)
|
||||
return;
|
||||
//todo test move
|
||||
|
||||
mp.SetVoiceChannel(vch);
|
||||
}
|
||||
|
||||
@ -886,7 +886,6 @@ namespace NadekoBot.Modules.Music
|
||||
await ReplyConfirmLocalized("autoplay_enabled").ConfigureAwait(false);
|
||||
}
|
||||
|
||||
//todo test output text channel
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
[RequireUserPermission(GuildPermission.ManageMessages)]
|
||||
|
@ -63,6 +63,7 @@ namespace NadekoBot.Services.Music
|
||||
|
||||
|
||||
private bool manualSkip = false;
|
||||
private bool newVoiceChannel = false;
|
||||
|
||||
public MusicPlayer(MusicService musicService, IVoiceChannel vch, ITextChannel output, float volume)
|
||||
{
|
||||
@ -200,7 +201,8 @@ namespace NadekoBot.Services.Music
|
||||
{
|
||||
if (_audioClient == null ||
|
||||
_audioClient.ConnectionState != ConnectionState.Connected ||
|
||||
reconnect)
|
||||
reconnect ||
|
||||
newVoiceChannel)
|
||||
try
|
||||
{
|
||||
try
|
||||
@ -211,6 +213,7 @@ namespace NadekoBot.Services.Music
|
||||
catch
|
||||
{
|
||||
}
|
||||
newVoiceChannel = false;
|
||||
_audioClient = await VoiceChannel.ConnectAsync();
|
||||
}
|
||||
catch
|
||||
@ -389,6 +392,7 @@ namespace NadekoBot.Services.Music
|
||||
public void SetVoiceChannel(IVoiceChannel vch)
|
||||
{
|
||||
VoiceChannel = vch;
|
||||
newVoiceChannel = true;
|
||||
Next();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user