Sped up .streamrole initialization 5x, but it might error out if there are too many users streaming when the command is ran.

This commit is contained in:
Master Kwoth 2017-07-20 20:03:11 +02:00
parent 9163510eee
commit cedaf73785

View File

@ -253,8 +253,7 @@ namespace NadekoBot.Modules.Utility.Services
foreach (var usr in await fromRole.Guild.GetUsersAsync(CacheMode.CacheOnly).ConfigureAwait(false))
{
await TryApplyRole(usr, setting).ConfigureAwait(false);
await Task.Delay(500).ConfigureAwait(false);
await Task.WhenAll(TryApplyRole(usr, setting), Task.Delay(100)).ConfigureAwait(false);
}
}