Fixed #124 : DMs are now sent to ticket creator

This commit is contained in:
DJj123dj
2025-01-25 11:18:10 +01:00
parent d35eb8f8bf
commit 057a5fc6ae
11 changed files with 22 additions and 11 deletions
+2 -1
View File
@@ -65,7 +65,8 @@ export const registerActions = async () => {
}
//to dm
if (generalConfig.data.system.messages.pinning.dm) await openticket.client.sendUserDm(user,await openticket.builders.messages.getSafe("openticket:ticket-action-dm").build(source,{guild,channel,user,ticket,mode:"unpin",reason,additionalData:null}))
const creator = await openticket.tickets.getTicketUser(ticket,"creator")
if (creator && generalConfig.data.system.messages.pinning.dm) await openticket.client.sendUserDm(creator,await openticket.builders.messages.getSafe("openticket:ticket-action-dm").build(source,{guild,channel,user,ticket,mode:"unpin",reason,additionalData:null}))
}),
new api.ODWorker("openticket:logs",0,(instance,params,source,cancel) => {
const {guild,channel,user,ticket} = params