From 018c9491047765e06ba2e885f41d20d04361067c Mon Sep 17 00:00:00 2001 From: Char Date: Sat, 16 May 2026 17:35:39 +0100 Subject: [PATCH] transcripts --- API/server.js | 121 +++- Configs/supportbot.yml | 34 +- Configs/transcript-template.yml | 33 + .../1505240742992548034-transcript.html | 488 +++++++++++++ .../1505247252829180018-transcript.html | 426 +++++++++++ Data/supportbot.db | Bin 49152 -> 49152 bytes Logs/Error/Error-2026-05-16.log | 4 + Logs/Output/Output-2026-05-16.log | 323 +++++++++ Structures/TicketManager.js | 400 +---------- Structures/TranscriptTemplate.js | 680 ++++++++++++++++++ Structures/googleFonts.js | 84 +++ public/dashboard/assets/index-2nPMgH3H.css | 1 - public/dashboard/assets/index-CkVwGOES.js | 187 ----- public/dashboard/assets/index-DPWGusls.js | 187 +++++ public/dashboard/assets/index-DxUg_xTw.css | 1 + public/dashboard/index.html | 4 +- 16 files changed, 2361 insertions(+), 612 deletions(-) create mode 100644 Configs/transcript-template.yml create mode 100644 Data/Transcripts/1505240742992548034-transcript.html create mode 100644 Data/Transcripts/1505247252829180018-transcript.html create mode 100644 Logs/Error/Error-2026-05-16.log create mode 100644 Logs/Output/Output-2026-05-16.log create mode 100644 Structures/TranscriptTemplate.js create mode 100644 Structures/googleFonts.js delete mode 100644 public/dashboard/assets/index-2nPMgH3H.css delete mode 100644 public/dashboard/assets/index-CkVwGOES.js create mode 100644 public/dashboard/assets/index-DPWGusls.js create mode 100644 public/dashboard/assets/index-DxUg_xTw.css diff --git a/API/server.js b/API/server.js index ee27a10..b58bc4e 100644 --- a/API/server.js +++ b/API/server.js @@ -63,6 +63,7 @@ const { clearGuildResourcesCache, } = require('../Structures/GuildManager.js'); const { withTimeout } = require('../Structures/asyncTimeout.js'); +const transcriptTemplate = require('../Structures/TranscriptTemplate.js'); const { listCatalogAddons, listInstalledAddons, @@ -1078,24 +1079,87 @@ h1{font-size:1.25rem}a{color:#a78bfa} }); // --- Transcript API --- + const transcriptDir = path.join(__dirname, '../Data/Transcripts'); + + const readTranscriptFile = (rawId) => { + const id = String(rawId).replace(/[^0-9]/g, ''); + if (!id) return null; + const filePath = path.join(transcriptDir, `${id}-transcript.html`); + if (!fs.existsSync(filePath)) return null; + const content = fs.readFileSync(filePath, 'utf8'); + const titleMatch = content.match(/\s*Transcript\s*-\s*([^<]+)\s*<\/title>/i); + return { + id, + filePath, + filename: `${id}-transcript.html`, + content, + ticketName: titleMatch ? titleMatch[1].trim() : null, + }; + }; + + const canEditTranscriptTemplate = (req) => { + if (req.dashboardService) return true; + if (!hasPermission(req.dashboardPermissions, 'transcripts')) return false; + if (req.dashboardRole === 'viewer') return false; + return true; + }; + + app.get('/system/transcript-template', p('transcripts'), (req, res) => { + try { + res.json({ success: true, data: transcriptTemplate.getTemplate() }); + } catch (err) { + res.status(500).json({ success: false, error: 'Failed to load transcript template' }); + } + }); + + app.put('/system/transcript-template', p('transcripts'), (req, res) => { + if (!canEditTranscriptTemplate(req)) { + return forbid(res); + } + try { + const saved = transcriptTemplate.saveTemplate(req.body); + res.json({ + success: true, + data: saved, + message: 'Transcript appearance saved. New transcripts will use this design.', + }); + } catch (err) { + res.status(500).json({ success: false, error: err.message || 'Failed to save template' }); + } + }); + + app.post('/system/transcript-template/preview', p('transcripts'), (req, res) => { + try { + const html = transcriptTemplate.renderPreview(req.body); + res.setHeader('Content-Type', 'text/html; charset=utf-8'); + res.setHeader('Cache-Control', 'no-store'); + res.send(html); + } catch (err) { + res.status(500).type('html').send('<!DOCTYPE html><body><h1>Preview failed</h1></body>'); + } + }); + app.get('/system/transcripts', p('transcripts'), (req, res) => { - const transcriptDir = './Data/Transcripts'; try { if (!fs.existsSync(transcriptDir)) { return res.json({ success: true, data: [] }); } const files = fs.readdirSync(transcriptDir); const transcripts = files - .filter(f => f.endsWith('-transcript.html')) - .map(f => { - const stats = fs.statSync(`${transcriptDir}/${f}`); + .filter((f) => f.endsWith('-transcript.html')) + .map((f) => { + const id = f.replace('-transcript.html', ''); + const stats = fs.statSync(path.join(transcriptDir, f)); + const parsed = readTranscriptFile(id); return { - id: f.replace('-transcript.html', ''), + id, filename: f, - createdAt: stats.mtime + createdAt: stats.mtime.toISOString(), + size: stats.size, + ticketName: parsed?.ticketName ?? null, }; }) - .sort((a, b) => b.createdAt - a.createdAt); + .sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt)); res.json({ success: true, data: transcripts }); } catch (err) { res.status(500).json({ success: false, error: 'Failed to list transcripts' }); @@ -1103,18 +1167,51 @@ h1{font-size:1.25rem}a{color:#a78bfa}</style></head><body> }); app.get('/system/transcripts/:id', p('transcripts'), (req, res) => { - const id = req.params.id.replace(/[^0-9]/g, ''); // Sanitize ID - const filePath = `./Data/Transcripts/${id}-transcript.html`; try { - if (!fs.existsSync(filePath)) { + const transcript = readTranscriptFile(req.params.id); + if (!transcript) { return res.status(404).json({ success: false, error: 'Transcript not found' }); } - const content = fs.readFileSync(filePath, 'utf8'); - res.json({ success: true, data: content }); + res.json({ success: true, data: transcript.content }); } catch (err) { res.status(500).json({ success: false, error: 'Failed to read transcript' }); } }); + + app.get('/system/transcripts/:id/view', p('transcripts'), (req, res) => { + try { + const transcript = readTranscriptFile(req.params.id); + if (!transcript) { + return res.status(404).type('html').send( + '<!DOCTYPE html><body style="font-family:sans-serif;padding:2rem;background:#0b0f14;color:#e6edf3"><h1>Transcript not found</h1></body>', + ); + } + res.setHeader('Content-Type', 'text/html; charset=utf-8'); + res.setHeader('Cache-Control', 'private, max-age=60'); + res.send(transcript.content); + } catch (err) { + res.status(500).type('html').send( + '<!DOCTYPE html><body style="font-family:sans-serif;padding:2rem"><h1>Failed to load transcript</h1></body>', + ); + } + }); + + app.get('/system/transcripts/:id/download', p('transcripts'), (req, res) => { + try { + const transcript = readTranscriptFile(req.params.id); + if (!transcript) { + return res.status(404).json({ success: false, error: 'Transcript not found' }); + } + res.setHeader('Content-Type', 'text/html; charset=utf-8'); + res.setHeader( + 'Content-Disposition', + `attachment; filename="${transcript.filename}"`, + ); + res.send(transcript.content); + } catch (err) { + res.status(500).json({ success: false, error: 'Failed to download transcript' }); + } + }); } } diff --git a/Configs/supportbot.yml b/Configs/supportbot.yml index 7288e49..6f7ed82 100644 --- a/Configs/supportbot.yml +++ b/Configs/supportbot.yml @@ -63,12 +63,12 @@ Embed: Roles: AutoRole: Enabled: true - Role: "ROLE_ID" + Role: "1491881628065337404" StaffMember: - Staff: "ROLE_ID" - Admin: "ROLE_ID" - Moderator: "ROLE_ID" + Staff: "1198299671576195213" + Admin: "1198295676128329799" + Moderator: "1198299671576195213" Mod: AllowSupportStaff: false @@ -79,11 +79,11 @@ Roles: # ---------------------------- Welcome: - Enabled: true + Enabled: false Channel: "CHANNEL_ID" Leave: - Enabled: true + Enabled: false Channel: "CHANNEL_ID" # ---------------------------- @@ -150,16 +150,16 @@ Ticket: DMOnRemove: true # DM the user when they are removed from the ticket DMTranscript: true # DM the user a transcript of the ticket when it is closed - TicketHome: "1469028381638000725" + TicketHome: "1290752269880660079" # What is TicketHome? # - Channel where the Ticket creation panel is sent. # - Channel where ticket threads are made. (only if ticket threads is enabled above.) # For TicketType: channels - TicketChannelsCategory: "CATEGORY_ID" + TicketChannelsCategory: "1505240336736452809" TicketChannelsCategory2: "CATEGORY_ID" # This will be used if the first category has reached the max channel limit. - TicketArchiveCategory: "CATEGORY_ID" + TicketArchiveCategory: "1505240336736452809" # --- Channel: "ticket-" # The prefix for ticket channel names @@ -186,7 +186,7 @@ Ticket: ClaimTickets: Enabled: false - Channel: "CHANNEL_ID" + Channel: "1290752269880660079" # Channel where the ticket assignments are sent for staff to claim. ClaimAcceptTime: 120000 @@ -220,12 +220,12 @@ Ticket: - "Have you tried resolving the issue yourself?" Log: - TicketDataLog: "CHANNEL_ID" + TicketDataLog: "1290752269880660079" TickeDataTitle: "Ticket Data" - TicketBlacklistLog: "CHANNEL_ID" + TicketBlacklistLog: "1290752269880660079" AIMode: - Enabled: true + Enabled: false ThreadName: "Chat with SupportBot AI" WelcomeMessage: "Hi! I’m SupportBot AI. You can chat with me here about your issue." @@ -234,7 +234,7 @@ Ticket: # ------------------------- DepartmentSystem: - Enabled: true + Enabled: false Placeholder: "Choose a ticket department" DefaultDepartment: "general" @@ -358,12 +358,12 @@ SelectMenus: # ------------------------- MessageDelete: - Channel: "CHANNEL_ID" + Channel: "1290752269880660079" Colour: "#d92525" MessageUpdate: - Channel: "CHANNEL_ID" + Channel: "1290752269880660079" Colour: "#f2a024" Translate: - TranslateLog: "CHANNEL_ID" + TranslateLog: "1290752269880660079" diff --git a/Configs/transcript-template.yml b/Configs/transcript-template.yml new file mode 100644 index 0000000..824920f --- /dev/null +++ b/Configs/transcript-template.yml @@ -0,0 +1,33 @@ +Theme: + Background: '#0e0e0e' + Panel: '#1d1d1d' + PanelSecondary: '#222222' + PanelTertiary: '#1d2938' + Border: '#2e2e2e' + Text: '#e6edf3' + Muted: '#606060' + Accent: '#396ff8' + AccentSoft: rgba(34, 197, 94, 0.12) + AccentBorder: rgba(34, 197, 94, 0.25) + AccentText: '#8df0ad' + Link: '#396ff8' + AttachmentLink: '#396ff8' + CodeBackground: '#0e0e0e' +Typography: + FontFamily: Poppins +Header: + Title: Ticket Transcript + Subtitle: Exported conversation log for support ticket **{{ticketName}}** + Badge: Closed Transcript + ShowMetaCards: true +Meta: + ChannelLabel: Ticket Name + TicketIdLabel: Ticket ID + MessageCountLabel: Message Count + CloseReasonLabel: Close Reason + DefaultCloseReason: No Reason Provided. +Messages: + SectionTitle: Messages + EmptyState: No messages were found in this ticket. +Advanced: + CustomCss: '' diff --git a/Data/Transcripts/1505240742992548034-transcript.html b/Data/Transcripts/1505240742992548034-transcript.html new file mode 100644 index 0000000..b661cc6 --- /dev/null +++ b/Data/Transcripts/1505240742992548034-transcript.html @@ -0,0 +1,488 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Transcript - ticket-0004 + + + +
+
+
+
+

Ticket Transcript

+

Exported conversation log for support ticket ticket-0004

+
+
Closed Transcript
+
+ +
+
+
Channel
+
ticket-0004
+
+
+
Ticket ID
+
1505240742992548034
+
+
+
Message Count
+
8
+
+
+
Close Reason
+
No Reason Provided.
+
+
+
+ +
+
Messages
+ +
+ Avatar +
+
+ BLITZ + 1289713673123922032 + 16 May 2026, 17:09 +
+ +
+ + + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:09 +
+ +
sd
+ + + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:09 +
+ +
sdaf
+ + + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:09 +
+ +
dsf
+ + + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:09 +
+ +
eefw
+ + + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:09 +
+ +
dsf
+ + + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:09 +
+ +
ef
+ + + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:09 +
+ +
dsf
+ + + +
+
+ +
+
+ + \ No newline at end of file diff --git a/Data/Transcripts/1505247252829180018-transcript.html b/Data/Transcripts/1505247252829180018-transcript.html new file mode 100644 index 0000000..76aa008 --- /dev/null +++ b/Data/Transcripts/1505247252829180018-transcript.html @@ -0,0 +1,426 @@ + + + + + + Transcript - ticket-0005 + + + + +
+
+
+
+

Ticket Transcript

+

Exported conversation log for support ticket ticket-0005

+
+
Closed Transcript
+
+ +
+
+
Ticket Name
+
ticket-0005
+
+
+
Ticket ID
+
1505247252829180018
+
+
+
Message Count
+
8
+
+
+
Close Reason
+
No Reason Provided.
+
+
+ +
+ +
+
Messages
+ +
+ Avatar +
+
+ BLITZ + 1289713673123922032 + 16 May 2026, 17:35 +
+
+ + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:35 +
+
fdg
+ + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:35 +
+
fdg
+ + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:35 +
+
df
+ + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:35 +
+
gfdg
+ + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:35 +
+
df
+ + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:35 +
+
gdfg
+ + +
+
+ +
+ Avatar +
+
+ ch_ar. + 829112572816130058 + 16 May 2026, 17:35 +
+
fdg
+ + +
+
+ +
+
+ + \ No newline at end of file diff --git a/Data/supportbot.db b/Data/supportbot.db index 46c689123b694e158dcc297d22b3b3172f7fb328..da99cc0f4b678afc8a2849b938b5b2876c1d0cb8 100644 GIT binary patch delta 554 zcmZo@U~Xt&o*>PrI8nx#QE_9!5`PXRepLqk$^5FD1qCGe>vNcdjSVGPSw(pnq$N2R zfIv`L)X>zx)X2o#$kfQf$kNclz`)P~#4t26H8-*_G&3|dFfg@9&dD!MO<|m8xL8da zME-6mNi8l(Pt8j$O3cYkP01|HjgBqJOwLX%(KP^S0O4##h;70!+cFT=8JL?GSy~#I znphYZo8YmoyX-p9x*0PMrWB{)w9N!)n+X@tH%$B&8TeoFUj+L0D8I8fvoRwU&oPNH z8*@U$QCz_bG=Pmil!5;&|5pCF{H^@C{GmXD9Qo_T*jO2)MOh0H^HOtk&GPc|Qb9qW zFjI^bN!%1F-d#9Vj0H*D1S;P3dYu?ElDIKU{Ms`yCM0nqn0Ts~AtNh;u`#O|)UhT; zz&J59vj9exiJ_6Dfw`%Xk(s51g@Kuwfq}Ut&`n+Lk|19&^1ox?e+P8?6Mi89MrKt; ONW{d0J;1g|zyJW}gNwKT delta 36 pcmZo@U~Xt&o*>OAI8nx#QE+3z693IC0)O-u83=4LU{L_E`2o?f3w8hi diff --git a/Logs/Error/Error-2026-05-16.log b/Logs/Error/Error-2026-05-16.log new file mode 100644 index 0000000..c326e32 --- /dev/null +++ b/Logs/Error/Error-2026-05-16.log @@ -0,0 +1,4 @@ +[2026-05-16T16:08:27.722Z] Error handling ticket close: Error: Transcript log channel missing or inaccessible. +[2026-05-16T16:09:37.993Z] Error handling ticket close: Error: Transcript log channel missing or inaccessible. +[2026-05-16T16:10:44.033Z] Error handling ticket close: Error: Transcript log channel missing or inaccessible. +[2026-05-16T16:34:05.434Z] Error handling ticket close: Error: Transcript log channel missing or inaccessible. diff --git a/Logs/Output/Output-2026-05-16.log b/Logs/Output/Output-2026-05-16.log new file mode 100644 index 0000000..49037d8 --- /dev/null +++ b/Logs/Output/Output-2026-05-16.log @@ -0,0 +1,323 @@ +[2026-05-16T16:05:18.835Z] [API] Server running on port 3000 +[2026-05-16T16:05:19.572Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:05:19.573Z] SupportBot +[2026-05-16T16:05:19.573Z] Emerald Services +[2026-05-16T16:05:19.574Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:05:19.574Z] +System +[2026-05-16T16:05:19.575Z] ------ +[2026-05-16T16:05:19.576Z] Bot Name  SupportBo +[2026-05-16T16:05:19.576Z] Version  v26.1.1 +[2026-05-16T16:05:19.576Z] Node.js  v24.14.1 +[2026-05-16T16:05:19.577Z] Discord.js  v14.26.4 +[2026-05-16T16:05:19.577Z] Logged in as  BLITZ#7183 +[2026-05-16T16:05:19.578Z] Guilds  1 +[2026-05-16T16:05:19.578Z] +Links +[2026-05-16T16:05:19.579Z] ----- +[2026-05-16T16:05:19.580Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:05:19.580Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:05:19.581Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:05:19.581Z] +[2026-05-16T16:05:19.582Z] [Dashboard] Discord bot is ready — full stats and guild tools are available +[2026-05-16T16:05:19.584Z] +Config Check +[2026-05-16T16:05:19.585Z] ------------ +[2026-05-16T16:05:19.587Z] ! Missing roles (ROLE_ID, ROLE_ID, ROLE_ID) +[2026-05-16T16:05:19.587Z] ! Missing channels (1469028381638000725) +[2026-05-16T16:05:19.588Z] +[2026-05-16T16:05:19.975Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:06:05.176Z]  [Executed]  ch_ar. has executed ticketpanel +[2026-05-16T16:06:05.178Z] [TICKET PANEL] TicketHome channel not found. Please check your config file. +[2026-05-16T16:06:40.773Z] [BotReload] Restarting Discord bot after config change… +[2026-05-16T16:06:41.788Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:06:41.788Z] SupportBot +[2026-05-16T16:06:41.789Z] Emerald Services +[2026-05-16T16:06:41.789Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:06:41.789Z] +System +[2026-05-16T16:06:41.789Z] ------ +[2026-05-16T16:06:41.790Z] Bot Name  SupportBo +[2026-05-16T16:06:41.790Z] Version  v26.1.1 +[2026-05-16T16:06:41.790Z] Node.js  v24.14.1 +[2026-05-16T16:06:41.791Z] Discord.js  v14.26.4 +[2026-05-16T16:06:41.791Z] Logged in as  BLITZ#7183 +[2026-05-16T16:06:41.792Z] Guilds  1 +[2026-05-16T16:06:41.792Z] +Links +[2026-05-16T16:06:41.792Z] ----- +[2026-05-16T16:06:41.793Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:06:41.794Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:06:41.796Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:06:41.797Z] +[2026-05-16T16:06:41.798Z] +Config Check +[2026-05-16T16:06:41.799Z] ------------ +[2026-05-16T16:06:41.799Z] ! Missing roles (ROLE_ID, ROLE_ID, ROLE_ID) +[2026-05-16T16:06:41.800Z] +[2026-05-16T16:06:42.207Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:06:42.208Z] [BotReload] Bot restarted successfully +[2026-05-16T16:06:46.079Z]  [Executed]  ch_ar. has executed ticketpanel +[2026-05-16T16:07:13.971Z] [BotReload] Restarting Discord bot after config change… +[2026-05-16T16:07:14.625Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:07:14.626Z] SupportBot +[2026-05-16T16:07:14.626Z] Emerald Services +[2026-05-16T16:07:14.627Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:07:14.627Z] +System +[2026-05-16T16:07:14.629Z] ------ +[2026-05-16T16:07:14.629Z] Bot Name  SupportBo +[2026-05-16T16:07:14.630Z] Version  v26.1.1 +[2026-05-16T16:07:14.630Z] Node.js  v24.14.1 +[2026-05-16T16:07:14.630Z] Discord.js  v14.26.4 +[2026-05-16T16:07:14.631Z] Logged in as  BLITZ#7183 +[2026-05-16T16:07:14.631Z] Guilds  1 +[2026-05-16T16:07:14.632Z] +Links +[2026-05-16T16:07:14.632Z] ----- +[2026-05-16T16:07:14.633Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:07:14.634Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:07:14.634Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:07:14.635Z] +[2026-05-16T16:07:14.636Z] +Config Check +[2026-05-16T16:07:14.637Z] ------------ +[2026-05-16T16:07:14.638Z] ✓ All configurations validated successfully +[2026-05-16T16:07:14.639Z] +[2026-05-16T16:07:14.949Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:07:14.950Z] [BotReload] Bot restarted successfully +[2026-05-16T16:07:53.691Z] [BotReload] Restarting Discord bot after config change… +[2026-05-16T16:07:54.472Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:07:54.473Z] SupportBot +[2026-05-16T16:07:54.473Z] Emerald Services +[2026-05-16T16:07:54.473Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:07:54.474Z] +System +[2026-05-16T16:07:54.474Z] ------ +[2026-05-16T16:07:54.474Z] Bot Name  SupportBo +[2026-05-16T16:07:54.475Z] Version  v26.1.1 +[2026-05-16T16:07:54.475Z] Node.js  v24.14.1 +[2026-05-16T16:07:54.476Z] Discord.js  v14.26.4 +[2026-05-16T16:07:54.476Z] Logged in as  BLITZ#7183 +[2026-05-16T16:07:54.476Z] Guilds  1 +[2026-05-16T16:07:54.477Z] +Links +[2026-05-16T16:07:54.477Z] ----- +[2026-05-16T16:07:54.478Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:07:54.479Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:07:54.479Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:07:54.480Z] +[2026-05-16T16:07:54.480Z] +Config Check +[2026-05-16T16:07:54.481Z] ------------ +[2026-05-16T16:07:54.481Z] ✓ All configurations validated successfully +[2026-05-16T16:07:54.482Z] +[2026-05-16T16:07:54.774Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:07:54.774Z] [BotReload] Bot restarted successfully +[2026-05-16T16:09:08.559Z] [BotReload] Restarting Discord bot after config change… +[2026-05-16T16:09:09.098Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:09:09.099Z] SupportBot +[2026-05-16T16:09:09.101Z] Emerald Services +[2026-05-16T16:09:09.101Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:09:09.102Z] +System +[2026-05-16T16:09:09.102Z] ------ +[2026-05-16T16:09:09.103Z] Bot Name  SupportBo +[2026-05-16T16:09:09.103Z] Version  v26.1.1 +[2026-05-16T16:09:09.104Z] Node.js  v24.14.1 +[2026-05-16T16:09:09.104Z] Discord.js  v14.26.4 +[2026-05-16T16:09:09.105Z] Logged in as  BLITZ#7183 +[2026-05-16T16:09:09.105Z] Guilds  1 +[2026-05-16T16:09:09.105Z] +Links +[2026-05-16T16:09:09.106Z] ----- +[2026-05-16T16:09:09.107Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:09:09.107Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:09:09.108Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:09:09.109Z] +[2026-05-16T16:09:09.110Z] +Config Check +[2026-05-16T16:09:09.111Z] ------------ +[2026-05-16T16:09:09.112Z] ✓ All configurations validated successfully +[2026-05-16T16:09:09.112Z] +[2026-05-16T16:09:09.434Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:09:09.435Z] [BotReload] Bot restarted successfully +[2026-05-16T16:10:24.089Z] [BotReload] Restarting Discord bot after config change… +[2026-05-16T16:10:24.662Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:10:24.662Z] SupportBot +[2026-05-16T16:10:24.663Z] Emerald Services +[2026-05-16T16:10:24.663Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:10:24.664Z] +System +[2026-05-16T16:10:24.664Z] ------ +[2026-05-16T16:10:24.664Z] Bot Name  SupportBo +[2026-05-16T16:10:24.665Z] Version  v26.1.1 +[2026-05-16T16:10:24.665Z] Node.js  v24.14.1 +[2026-05-16T16:10:24.666Z] Discord.js  v14.26.4 +[2026-05-16T16:10:24.666Z] Logged in as  BLITZ#7183 +[2026-05-16T16:10:24.666Z] Guilds  1 +[2026-05-16T16:10:24.667Z] +Links +[2026-05-16T16:10:24.667Z] ----- +[2026-05-16T16:10:24.668Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:10:24.670Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:10:24.671Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:10:24.671Z] +[2026-05-16T16:10:24.672Z] +Config Check +[2026-05-16T16:10:24.673Z] ------------ +[2026-05-16T16:10:24.674Z] ✓ All configurations validated successfully +[2026-05-16T16:10:24.675Z] +[2026-05-16T16:10:24.951Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:10:24.952Z] [BotReload] Bot restarted successfully +[2026-05-16T16:21:37.767Z] [API] Server running on port 3000 +[2026-05-16T16:21:38.731Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:21:38.731Z] SupportBot +[2026-05-16T16:21:38.732Z] Emerald Services +[2026-05-16T16:21:38.732Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:21:38.733Z] +System +[2026-05-16T16:21:38.733Z] ------ +[2026-05-16T16:21:38.733Z] Bot Name  SupportBo +[2026-05-16T16:21:38.734Z] Version  v26.1.1 +[2026-05-16T16:21:38.734Z] Node.js  v24.14.1 +[2026-05-16T16:21:38.735Z] Discord.js  v14.26.4 +[2026-05-16T16:21:38.735Z] Logged in as  BLITZ#7183 +[2026-05-16T16:21:38.736Z] Guilds  1 +[2026-05-16T16:21:38.736Z] +Links +[2026-05-16T16:21:38.737Z] ----- +[2026-05-16T16:21:38.737Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:21:38.738Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:21:38.738Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:21:38.739Z] +[2026-05-16T16:21:38.740Z] [Dashboard] Discord bot is ready — full stats and guild tools are available +[2026-05-16T16:21:38.741Z] +Config Check +[2026-05-16T16:21:38.741Z] ------------ +[2026-05-16T16:21:38.743Z] ✓ All configurations validated successfully +[2026-05-16T16:21:38.745Z] +[2026-05-16T16:21:38.986Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:22:10.150Z] [BotReload] Restarting Discord bot after config change… +[2026-05-16T16:22:10.821Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:22:10.821Z] SupportBot +[2026-05-16T16:22:10.822Z] Emerald Services +[2026-05-16T16:22:10.822Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:22:10.822Z] +System +[2026-05-16T16:22:10.823Z] ------ +[2026-05-16T16:22:10.823Z] Bot Name  SupportBo +[2026-05-16T16:22:10.823Z] Version  v26.1.1 +[2026-05-16T16:22:10.824Z] Node.js  v24.14.1 +[2026-05-16T16:22:10.825Z] Discord.js  v14.26.4 +[2026-05-16T16:22:10.826Z] Logged in as  BLITZ#7183 +[2026-05-16T16:22:10.827Z] Guilds  1 +[2026-05-16T16:22:10.827Z] +Links +[2026-05-16T16:22:10.828Z] ----- +[2026-05-16T16:22:10.828Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:22:10.829Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:22:10.829Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:22:10.830Z] +[2026-05-16T16:22:10.831Z] +Config Check +[2026-05-16T16:22:10.831Z] ------------ +[2026-05-16T16:22:10.832Z] ✓ All configurations validated successfully +[2026-05-16T16:22:10.832Z] +[2026-05-16T16:22:11.140Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:22:11.140Z] [BotReload] Bot restarted successfully +[2026-05-16T16:28:25.190Z] [API] Server running on port 3000 +[2026-05-16T16:28:26.233Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:28:26.234Z] SupportBot +[2026-05-16T16:28:26.234Z] Emerald Services +[2026-05-16T16:28:26.235Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:28:26.235Z] +System +[2026-05-16T16:28:26.236Z] ------ +[2026-05-16T16:28:26.236Z] Bot Name  SupportBo +[2026-05-16T16:28:26.237Z] Version  v26.1.1 +[2026-05-16T16:28:26.237Z] Node.js  v24.14.1 +[2026-05-16T16:28:26.238Z] Discord.js  v14.26.4 +[2026-05-16T16:28:26.238Z] Logged in as  BLITZ#7183 +[2026-05-16T16:28:26.240Z] Guilds  1 +[2026-05-16T16:28:26.241Z] +Links +[2026-05-16T16:28:26.241Z] ----- +[2026-05-16T16:28:26.242Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:28:26.243Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:28:26.243Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:28:26.244Z] +[2026-05-16T16:28:26.244Z] [Dashboard] Discord bot is ready — full stats and guild tools are available +[2026-05-16T16:28:26.248Z] +Config Check +[2026-05-16T16:28:26.250Z] ------------ +[2026-05-16T16:28:26.252Z] ✓ All configurations validated successfully +[2026-05-16T16:28:26.252Z] +[2026-05-16T16:28:26.661Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:32:06.353Z] [API] Server running on port 3000 +[2026-05-16T16:32:07.061Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:32:07.062Z] SupportBot +[2026-05-16T16:32:07.063Z] Emerald Services +[2026-05-16T16:32:07.063Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:32:07.064Z] +System +[2026-05-16T16:32:07.065Z] ------ +[2026-05-16T16:32:07.065Z] Bot Name  SupportBo +[2026-05-16T16:32:07.065Z] Version  v26.1.1 +[2026-05-16T16:32:07.066Z] Node.js  v24.14.1 +[2026-05-16T16:32:07.066Z] Discord.js  v14.26.4 +[2026-05-16T16:32:07.067Z] Logged in as  BLITZ#7183 +[2026-05-16T16:32:07.067Z] Guilds  1 +[2026-05-16T16:32:07.067Z] +Links +[2026-05-16T16:32:07.068Z] ----- +[2026-05-16T16:32:07.068Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:32:07.069Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:32:07.070Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:32:07.070Z] +[2026-05-16T16:32:07.071Z] [Dashboard] Discord bot is ready — full stats and guild tools are available +[2026-05-16T16:32:07.073Z] +Config Check +[2026-05-16T16:32:07.074Z] ------------ +[2026-05-16T16:32:07.076Z] ✓ All configurations validated successfully +[2026-05-16T16:32:07.076Z] +[2026-05-16T16:32:07.631Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:34:35.063Z] [BotReload] Restarting Discord bot after config change… +[2026-05-16T16:34:35.633Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:34:35.633Z] SupportBot +[2026-05-16T16:34:35.634Z] Emerald Services +[2026-05-16T16:34:35.634Z] ──────────────────────────────────────────────────────── +[2026-05-16T16:34:35.634Z] +System +[2026-05-16T16:34:35.635Z] ------ +[2026-05-16T16:34:35.635Z] Bot Name  SupportBo +[2026-05-16T16:34:35.636Z] Version  v26.1.1 +[2026-05-16T16:34:35.636Z] Node.js  v24.14.1 +[2026-05-16T16:34:35.636Z] Discord.js  v14.26.4 +[2026-05-16T16:34:35.637Z] Logged in as  BLITZ#7183 +[2026-05-16T16:34:35.637Z] Guilds  1 +[2026-05-16T16:34:35.637Z] +Links +[2026-05-16T16:34:35.638Z] ----- +[2026-05-16T16:34:35.638Z] Docs  https://emerald-services.gitbook.io/ +[2026-05-16T16:34:35.639Z] Discord  https://dsc.gg/emerald-dev +[2026-05-16T16:34:35.639Z] Invite  https://discord.com/api/oauth2/authorize?client_id=1289713673123922032&permissions=8&scope=bot%20applications.commands +[2026-05-16T16:34:35.639Z] +[2026-05-16T16:34:35.640Z] +Config Check +[2026-05-16T16:34:35.641Z] ------------ +[2026-05-16T16:34:35.642Z] ✓ All configurations validated successfully +[2026-05-16T16:34:35.642Z] +[2026-05-16T16:34:35.923Z] +✓ Slash Commands Registered for Char's Test Server +[2026-05-16T16:34:35.924Z] [BotReload] Bot restarted successfully diff --git a/Structures/TicketManager.js b/Structures/TicketManager.js index 37be85a..991631f 100644 --- a/Structures/TicketManager.js +++ b/Structures/TicketManager.js @@ -1,4 +1,4 @@ -const fs = require("fs"); +const fs = require("fs"); const path = require("path"); const Discord = require("discord.js"); const yaml = require("js-yaml"); @@ -6,6 +6,7 @@ const db = require("./Database.js"); const supportbot = require("./ConfigStore").supportbot; const msgconfig = require("./ConfigStore").messages; +const { createTranscriptHTML } = require("./TranscriptTemplate.js"); function escapeHtml(str = "") { return String(str) @@ -68,7 +69,7 @@ function renderAttachment(att) { if (type === "image") { return `
- 📎 ${name} + 📎 ${name}
${name}
@@ -79,7 +80,7 @@ function renderAttachment(att) { if (type === "video") { return `
- 📎 ${name} + 📎 ${name}