.vcrole will try twice to remove role from leaving users

This commit is contained in:
Kwoth 2017-03-18 13:23:39 +01:00
parent 2331b2ea20
commit 0d1e870325

View File

@ -71,8 +71,17 @@ namespace NadekoBot.Modules.Administration
{ {
if (gusr.RoleIds.Contains(role.Id)) if (gusr.RoleIds.Contains(role.Id))
{ {
await gusr.RemoveRolesAsync(role).ConfigureAwait(false); try
await Task.Delay(500).ConfigureAwait(false); {
await gusr.RemoveRolesAsync(role).ConfigureAwait(false);
await Task.Delay(500).ConfigureAwait(false);
}
catch
{
await Task.Delay(200).ConfigureAwait(false);
await gusr.RemoveRolesAsync(role).ConfigureAwait(false);
await Task.Delay(500).ConfigureAwait(false);
}
} }
} }
//add new //add new