diff --git a/src/actions/closeTicket.ts b/src/actions/closeTicket.ts index a37bb7d..4e79f1f 100644 --- a/src/actions/closeTicket.ts +++ b/src/actions/closeTicket.ts @@ -17,10 +17,15 @@ export const registerActions = async () => { //update ticket ticket.get("opendiscord:closed").value = true - if (source == "autoclose") ticket.get("opendiscord:autoclosed").value = true - ticket.get("opendiscord:open").value = false ticket.get("opendiscord:closed-by").value = user.id ticket.get("opendiscord:closed-on").value = new Date().getTime() + + ticket.get("opendiscord:reopened").value = false + ticket.get("opendiscord:reopened-by").value = null + ticket.get("opendiscord:reopened-on").value = null + + if (source == "autoclose") ticket.get("opendiscord:autoclosed").value = true + ticket.get("opendiscord:open").value = false ticket.get("opendiscord:busy").value = true //update stats diff --git a/src/actions/reopenTicket.ts b/src/actions/reopenTicket.ts index 84e01fb..ecfe5e9 100644 --- a/src/actions/reopenTicket.ts +++ b/src/actions/reopenTicket.ts @@ -16,11 +16,16 @@ export const registerActions = async () => { await opendiscord.events.get("onTicketReopen").emit([ticket,user,channel,reason]) //update ticket + ticket.get("opendiscord:reopened").value = true + ticket.get("opendiscord:reopened-by").value = user.id + ticket.get("opendiscord:reopened-on").value = new Date().getTime() + ticket.get("opendiscord:closed").value = false - ticket.get("opendiscord:open").value = true - ticket.get("opendiscord:autoclosed").value = false ticket.get("opendiscord:closed-by").value = null ticket.get("opendiscord:closed-on").value = null + + ticket.get("opendiscord:autoclosed").value = false + ticket.get("opendiscord:open").value = true ticket.get("opendiscord:busy").value = true //update stats