mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-24 09:24:12 +00:00
Remove rate limit auto-retry
This commit is contained in:
parent
7ee4ff7ad1
commit
400cc4bfbd
2 changed files with 1 additions and 3 deletions
|
@ -139,10 +139,8 @@ class BirthdayRoleUpdate : BackgroundService {
|
|||
if (!toApply.Contains(user.Id)) removals.Add(user);
|
||||
else no_ops.Add(user.Id);
|
||||
}
|
||||
int removalAllowance = 15; // Limit removals per run, to not get continuously stuck on rate limits in misconfigured servers
|
||||
foreach (var user in removals) {
|
||||
await user.RemoveRoleAsync(r);
|
||||
if (--removalAllowance == 0) break;
|
||||
}
|
||||
|
||||
foreach (var target in toApply) {
|
||||
|
|
|
@ -113,7 +113,7 @@ class ShardManager : IDisposable {
|
|||
ShardId = shardId,
|
||||
TotalShards = Config.ShardTotal,
|
||||
LogLevel = LogSeverity.Info,
|
||||
DefaultRetryMode = RetryMode.AlwaysRetry,
|
||||
DefaultRetryMode = RetryMode.Retry502 | RetryMode.RetryTimeouts,
|
||||
GatewayIntents = GatewayIntents.Guilds | GatewayIntents.GuildMembers | GatewayIntents.GuildMessages
|
||||
};
|
||||
var services = new ServiceCollection()
|
||||
|
|
Loading…
Reference in a new issue