Implemented "removeParticipantsOnClose"

Implemented the option "removeParticipantsOnClose" in the config/general.json. It wasn't implemented in the code by accident.
This commit is contained in:
DJj123dj
2024-12-06 15:59:08 +01:00
parent 91ea12a6cc
commit 1e2321313f
+8 -2
View File
@@ -83,9 +83,15 @@ export const registerActions = async () => {
})
})
ticket.get("openticket:participants").value.forEach((participant) => {
//all participants that aren't roles/admins => readonly
//all participants that aren't roles/admins => readonly (OR non-viewable when enabled)
if (participant.type == "user"){
permissions.push({
if (generalConfig.data.system.removeParticipantsOnClose) permissions.push({
type:discord.OverwriteType.Member,
id:participant.id,
allow:[],
deny:["SendMessages","AddReactions","AttachFiles","SendPolls","ViewChannel","ReadMessageHistory"]
})
else permissions.push({
type:discord.OverwriteType.Member,
id:participant.id,
allow:["ViewChannel","ReadMessageHistory"],