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:
@@ -83,9 +83,15 @@ export const registerActions = async () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
ticket.get("openticket:participants").value.forEach((participant) => {
|
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"){
|
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,
|
type:discord.OverwriteType.Member,
|
||||||
id:participant.id,
|
id:participant.id,
|
||||||
allow:["ViewChannel","ReadMessageHistory"],
|
allow:["ViewChannel","ReadMessageHistory"],
|
||||||
|
|||||||
Reference in New Issue
Block a user