mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-01-31 09:09:00 +03:00
Fixed a memory leak caused by hitting rate limits, caused by attempts to add unset starter roles
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
05ce680373
commit
41958deb0a
1 changed files with 2 additions and 2 deletions
|
@ -150,13 +150,13 @@ public static class Boyfriend {
|
|||
if (!mData.IsInGuild) continue;
|
||||
if (mData.MutedUntil is null
|
||||
&& ulong.TryParse(config["StarterRole"], out var starterRoleId)
|
||||
&& guild.GetRole(starterRoleId) is not null
|
||||
&& !mData.Roles.Contains(starterRoleId)) _ = user.AddRoleAsync(starterRoleId);
|
||||
|
||||
if (now >= mData.MutedUntil) {
|
||||
await Utils.UnmuteMemberAsync(
|
||||
saveData = await Utils.UnmuteMemberAsync(
|
||||
data, Client.CurrentUser.ToString(), user,
|
||||
Messages.PunishmentExpired);
|
||||
saveData = true;
|
||||
}
|
||||
|
||||
for (var i = mData.Reminders.Count - 1; i >= 0; i--) {
|
||||
|
|
Loading…
Reference in a new issue