mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-30 19:19:54 +03:00
Synchronize roles only on member data updates (#130)
This PR makes it so that roles in MemberData are updated only in MemberUpdateService. This reduces possible points of failures, maintenance burden and reliance on gateway events
This commit is contained in:
parent
5d278883d5
commit
d713b977f0
3 changed files with 6 additions and 51 deletions
|
@ -89,6 +89,11 @@ public sealed partial class MemberUpdateService : BackgroundService
|
|||
return failedResults.AggregateErrors();
|
||||
}
|
||||
|
||||
if (data.MutedUntil is null)
|
||||
{
|
||||
data.Roles = guildMember.Roles.ToList().ConvertAll(r => r.Value);
|
||||
}
|
||||
|
||||
var autoUnmuteResult = await TryAutoUnmuteAsync(guildId, id, data, ct);
|
||||
failedResults.AddIfFailed(autoUnmuteResult);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue