Reverted the revert
This commit is contained in:
parent
4846a15801
commit
f5b0407392
@ -15,7 +15,7 @@ using Newtonsoft.Json.Linq;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NadekoBot.Services.Database.Models;
|
using NadekoBot.Services.Database.Models;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
//using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace NadekoBot.Modules.Music
|
namespace NadekoBot.Modules.Music
|
||||||
{
|
{
|
||||||
@ -326,7 +326,7 @@ namespace NadekoBot.Modules.Music
|
|||||||
var msg =
|
var msg =
|
||||||
await channel.SendMessageAsync($"🎵 Attempting to queue **{count}** songs".SnPl(count) + "...").ConfigureAwait(false);
|
await channel.SendMessageAsync($"🎵 Attempting to queue **{count}** songs".SnPl(count) + "...").ConfigureAwait(false);
|
||||||
|
|
||||||
/*var cancelSource = new CancellationTokenSource();
|
var cancelSource = new CancellationTokenSource();
|
||||||
|
|
||||||
var tasks = Task.WhenAll(idArray.Select(async id =>
|
var tasks = Task.WhenAll(idArray.Select(async id =>
|
||||||
{
|
{
|
||||||
@ -340,9 +340,9 @@ namespace NadekoBot.Modules.Music
|
|||||||
catch { try { cancelSource.Cancel(); } catch { } }
|
catch { try { cancelSource.Cancel(); } catch { } }
|
||||||
}));
|
}));
|
||||||
|
|
||||||
await Task.WhenAny(tasks, Task.Delay(Timeout.Infinite, cancelSource.Token));*/
|
await Task.WhenAny(tasks, Task.Delay(Timeout.Infinite, cancelSource.Token));
|
||||||
|
|
||||||
foreach (var id in idArray)
|
/*foreach (var id in idArray)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -350,7 +350,7 @@ namespace NadekoBot.Modules.Music
|
|||||||
}
|
}
|
||||||
catch (SongNotFoundException) { }
|
catch (SongNotFoundException) { }
|
||||||
catch { break; }
|
catch { break; }
|
||||||
}
|
}*/
|
||||||
|
|
||||||
await msg.ModifyAsync(m => m.Content = "✅ Playlist queue complete.").ConfigureAwait(false);
|
await msg.ModifyAsync(m => m.Content = "✅ Playlist queue complete.").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
@ -937,4 +937,4 @@ namespace NadekoBot.Modules.Music
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user