.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]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
public Task Play([Remainder]string query = null)
|
public Task Play([Remainder]string query = null)
|
||||||
@ -722,7 +722,7 @@ namespace NadekoBot.Modules.Music
|
|||||||
|
|
||||||
if (mp == null)
|
if (mp == null)
|
||||||
return;
|
return;
|
||||||
//todo test move
|
|
||||||
mp.SetVoiceChannel(vch);
|
mp.SetVoiceChannel(vch);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,7 +886,6 @@ namespace NadekoBot.Modules.Music
|
|||||||
await ReplyConfirmLocalized("autoplay_enabled").ConfigureAwait(false);
|
await ReplyConfirmLocalized("autoplay_enabled").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo test output text channel
|
|
||||||
[NadekoCommand, Usage, Description, Aliases]
|
[NadekoCommand, Usage, Description, Aliases]
|
||||||
[RequireContext(ContextType.Guild)]
|
[RequireContext(ContextType.Guild)]
|
||||||
[RequireUserPermission(GuildPermission.ManageMessages)]
|
[RequireUserPermission(GuildPermission.ManageMessages)]
|
||||||
|
@ -63,6 +63,7 @@ namespace NadekoBot.Services.Music
|
|||||||
|
|
||||||
|
|
||||||
private bool manualSkip = false;
|
private bool manualSkip = false;
|
||||||
|
private bool newVoiceChannel = false;
|
||||||
|
|
||||||
public MusicPlayer(MusicService musicService, IVoiceChannel vch, ITextChannel output, float volume)
|
public MusicPlayer(MusicService musicService, IVoiceChannel vch, ITextChannel output, float volume)
|
||||||
{
|
{
|
||||||
@ -200,7 +201,8 @@ namespace NadekoBot.Services.Music
|
|||||||
{
|
{
|
||||||
if (_audioClient == null ||
|
if (_audioClient == null ||
|
||||||
_audioClient.ConnectionState != ConnectionState.Connected ||
|
_audioClient.ConnectionState != ConnectionState.Connected ||
|
||||||
reconnect)
|
reconnect ||
|
||||||
|
newVoiceChannel)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -211,6 +213,7 @@ namespace NadekoBot.Services.Music
|
|||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
newVoiceChannel = false;
|
||||||
_audioClient = await VoiceChannel.ConnectAsync();
|
_audioClient = await VoiceChannel.ConnectAsync();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@ -389,6 +392,7 @@ namespace NadekoBot.Services.Music
|
|||||||
public void SetVoiceChannel(IVoiceChannel vch)
|
public void SetVoiceChannel(IVoiceChannel vch)
|
||||||
{
|
{
|
||||||
VoiceChannel = vch;
|
VoiceChannel = vch;
|
||||||
|
newVoiceChannel = true;
|
||||||
Next();
|
Next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user