Skip to content

Commit

Permalink
Ignore Message Update events where EditedTimestamp is older than 1d
Browse files Browse the repository at this point in the history
  • Loading branch information
FloatingMilkshake committed Aug 17, 2024
1 parent 0af70b1 commit 44c0cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Events/MessageEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static async Task MessageHandlerAsync(DiscordClient client, DiscordMessag
if (message.Timestamp.Year < (DateTime.Now.Year - 2))
return;

if (isAnEdit && (message.EditedTimestamp is null || message.EditedTimestamp == message.CreationTimestamp))
if (isAnEdit && (message.EditedTimestamp is null || message.EditedTimestamp == message.CreationTimestamp || message.EditedTimestamp < DateTimeOffset.Now - TimeSpan.FromDays(1)))
return;

if (message.Author is null || message.Author.Id == client.CurrentUser.Id)
Expand Down

0 comments on commit 44c0cbd

Please sign in to comment.