diff --git a/src/actions/deleteTicket.ts b/src/actions/deleteTicket.ts index 447d9d5..8748bf8 100644 --- a/src/actions/deleteTicket.ts +++ b/src/actions/deleteTicket.ts @@ -40,9 +40,11 @@ export const registerActions = async () => { //create transcript if (!params.withoutTranscript){ const transcriptRes = await openticket.actions.get("openticket:create-transcript").run(source,{guild,channel,user,ticket}) + //transcript failure if (typeof transcriptRes.success == "boolean" && !transcriptRes.success && transcriptRes.compiler){ const {compiler} = transcriptRes await channel.send((await openticket.builders.messages.getSafe("openticket:transcript-error").build(source,{guild,channel,user,ticket,compiler,reason:transcriptRes.errorReason ?? null})).message) + .catch((reason) => openticket.log("Unable to send transcript failure to ticket channel!","error",[{key:"id",value:channel.id}])) //undo deletion ticket.get("openticket:for-deletion").value = false @@ -83,7 +85,7 @@ export const registerActions = async () => { const {guild,channel,user,ticket,reason} = params //delete channel & events await openticket.events.get("onTicketChannelDeletion").emit([ticket,channel,user]) - await channel.delete("Ticket Deleted") + await channel.delete("Ticket Deleted").catch((reason) => openticket.log("Unable to delete ticket channel!","error",[{key:"id",value:channel.id}])) await openticket.events.get("afterTicketChannelDeleted").emit([ticket,user]) //delete permissions from manager diff --git a/src/core/api/modules/console.ts b/src/core/api/modules/console.ts index d36ce20..5b7e527 100644 --- a/src/core/api/modules/console.ts +++ b/src/core/api/modules/console.ts @@ -73,7 +73,7 @@ export class ODConsoleMessage { }) const pstring = (pstrings.length > 0) ? " ("+pstrings.join(", ")+")" : "" const date = new Date() - const dstring = `${date.getDate()}/${date.getMonth()}/${date.getFullYear()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}` + const dstring = `${date.getDate()}/${date.getMonth()+1}/${date.getFullYear()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}` return `[${dstring} ${this.prefix}] ${this.message}${pstring}` } /**Render the parameters of this message in a specific color. */ @@ -348,7 +348,7 @@ export class ODDebugFileManager { /**Generate the stats/header of the debug file (containing the version) */ #createStatsText(){ const date = new Date() - const dstring = `${date.getDate()}/${date.getMonth()}/${date.getFullYear()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}` + const dstring = `${date.getDate()}/${date.getMonth()+1}/${date.getFullYear()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}` return [ "=========================", "OPEN TICKET DEBUG FILE:", diff --git a/src/data/openticket/transcriptLoader.ts b/src/data/openticket/transcriptLoader.ts index b0ec97e..3430b91 100644 --- a/src/data/openticket/transcriptLoader.ts +++ b/src/data/openticket/transcriptLoader.ts @@ -47,7 +47,7 @@ export const loadAllTranscriptCompilers = async () => { openticket.transcripts.add(new api.ODTranscriptCompiler<{contents:string}>("openticket:text-compiler",undefined,async (ticket,channel,user) => { //COMPILE const rawMessages = await collector.collectAllMessages(ticket) - if (!rawMessages) return {ticket,channel,user,success:false,errorReason:"Unable to collect messages!",messages:null,data:null} + if (!rawMessages) return {ticket,channel,user,success:false,errorReason:"Unable to collect messages! Channel not found!",messages:null,data:null} const messages = await collector.convertMessagesToTranscriptData(rawMessages) const finalMessages: string[] = [] @@ -195,7 +195,7 @@ export const loadAllTranscriptCompilers = async () => { },async (ticket,channel,user) => { //COMPILE const rawMessages = await collector.collectAllMessages(ticket) - if (!rawMessages) return {ticket,channel,user,success:false,errorReason:"Unable to collect messages!",messages:null,data:null} + if (!rawMessages) return {ticket,channel,user,success:false,errorReason:"Unable to collect messages! Channel not found!",messages:null,data:null} const messages = await collector.convertMessagesToTranscriptData(rawMessages) const htmlMessages: api.ODTranscriptHtmlV2Data["messages"] = [] diff --git a/src/index.ts b/src/index.ts index 3da07f8..b1f87cf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,8 +20,9 @@ INFORMATION: ============ - Open Ticket v4.0.0 - © DJdj Development + Open Ticket v4.0.0 - © DJdj Development + support us: https://github.com/sponsors/DJj123dj discord: https://discord.dj-dj.be website: https://openticket.dj-dj.be github: https://otgithub.dj-dj.be diff --git a/src/livestatus.json b/src/livestatus.json index 4dcdd4d..88633e9 100644 --- a/src/livestatus.json +++ b/src/livestatus.json @@ -38,5 +38,25 @@ "usingTextTranscripts":true, "usingHtmlTranscripts":true } + }, + { + "message":{ + "title":"Support Us", + "titleColor":"magenta", + "description":"Support our development at https://github.com/sponsors/DJj123dj/", + "descriptionColor":"normal" + }, + "active":{ + "versions":["4.0.0"], + "languages":[], + "allLanguages":true, + "usingPlugins":true, + "notUsingPlugins":true, + "usingSlashCommands":true, + "notUsingSlashCommands":true, + "notUsingTranscripts":true, + "usingTextTranscripts":true, + "usingHtmlTranscripts":true + } } ] \ No newline at end of file