Skip to content

Commit

Permalink
Allow changing the staff notes
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Feb 16, 2025
1 parent c5ee8e8 commit 0daca59
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@ class LoriToolsCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrapp
val userIds = string("user_ids", "ID do usuário que você deseja renomear (pode ser vários)")

val reason = string("reason", "Motivo que irá aparecer no ban")

val staffNotes = optionalString("staff_notes", "Nota da Staff que irá aparecer no ban apenas para a staff")
}

override val options = Options()
Expand All @@ -496,6 +498,7 @@ class LoriToolsCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrapp
}

val reason = args[options.reason]
val staffNotes = args[options.staffNotes]

val results = transaction(helper.databases.lorittaDatabase) {
val results = mutableListOf<BanRenameResult>()
Expand Down Expand Up @@ -526,6 +529,7 @@ class LoriToolsCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrapp
if (banStatusIdsToBeUpdated.isNotEmpty()) {
BannedUsers.update({ BannedUsers.id inList banStatusIdsToBeUpdated }) {
it[BannedUsers.reason] = reason
it[BannedUsers.staffNotes] = staffNotes
}
}

Expand All @@ -546,7 +550,7 @@ class LoriToolsCommand(val helper: LorittaHelper) : SlashCommandDeclarationWrapp
"Motivo do Ban Alterado",
null,
reason,
null,
staffNotes,
Color(214, 0, 255)
)
}
Expand Down

0 comments on commit 0daca59

Please sign in to comment.