Skip to content

Commit

Permalink
hotfix for user catchup spam after users.conf corruption
Browse files Browse the repository at this point in the history
  • Loading branch information
Ixrec committed Nov 8, 2023
1 parent be31914 commit 21f7965
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Izzy-Moonbot/EventListeners/UserListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,13 @@ await _mod.AddRoles(member, _users[member.Id].RolesToReapplyOnRejoin,

var msg = $"{(catchingUp ? "Catching up on " : "")}Join: <@{member.Id}> (`{member.Id}`), created <t:{member.CreatedAt.ToUnixTimeSeconds()}:R>{autoSilence}{joinedBefore}{rolesAutoappliedString}";
_logger.Log($"Generated moderation log for user join: ${msg}");
await _modLogger.CreateModLog(member.Guild)
.SetContent(msg)
.SetFileLogContent(msg)
.Send();
if (!catchingUp)
{
await _modLogger.CreateModLog(member.Guild)
.SetContent(msg)
.SetFileLogContent(msg)
.Send();
}
}

private async Task MemberLeaveEvent(SocketGuild guild, SocketUser user)
Expand Down

0 comments on commit 21f7965

Please sign in to comment.