Skip to content

Commit

Permalink
Fix unpinning/pinning of old messages causing edit log (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoComment1105 committed Feb 9, 2024
1 parent 631e8e2 commit 359886e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class MessageEdit : Extension() {
requiredConfigs(ConfigOptions.MESSAGE_EDIT_LOGGING_ENABLED, ConfigOptions.MESSAGE_LOG)
failIf {
val message = event.message.asMessageOrNull()
message?.author?.isBot == true || event.old?.content == message?.content
message?.author?.isBot == true || event.old?.content == message?.content ||
event.old?.content.isNullOrEmpty()
}
}
action {
Expand All @@ -60,7 +61,8 @@ class MessageEdit : Extension() {
anyGuild()
requiredConfigs(ConfigOptions.MESSAGE_EDIT_LOGGING_ENABLED, ConfigOptions.MESSAGE_LOG)
failIf {
event.old?.content == event.message.asMessageOrNull()?.content
event.old?.content == event.message.asMessageOrNull()?.content ||
event.old?.content.isNullOrEmpty()
}
}
action {
Expand Down

0 comments on commit 359886e

Please sign in to comment.