Skip to content

Commit

Permalink
Add reason parameter to message deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
WinG4merBR committed Dec 28, 2024
1 parent b2edd79 commit 21bf899
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class AntiRaidSystem(
AntiRaidActions.WarnUser -> {
if (event != null) {
if (guild.selfMember.hasPermission(Permission.MESSAGE_MANAGE)) {
event.message.delete().queue()
event.message.delete().reason(message).queue()
sendAlertToUser(event.channel.id, event.author.id) {
content = pretty(
FoxyEmotes.FoxyRage,
Expand All @@ -212,7 +212,7 @@ class AntiRaidSystem(
else -> throw IllegalArgumentException("Invalid action type! Received $action")
}
} catch (e: Exception) {
logger.warn { "Can't take an action for user ${user.id}! Missing permissions?"}
logger.warn { "Can't take an action for user ${user.id}! Missing permissions?" }
}
}

Expand Down

0 comments on commit 21bf899

Please sign in to comment.