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:
parent
9163510eee
commit
cedaf73785
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user