.vcrole will try twice to remove role from leaving users
This commit is contained in:
parent
2331b2ea20
commit
0d1e870325
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user