feat: Ajout serveur transcript

This commit is contained in:
UltraLionFr
2025-08-27 19:01:26 +02:00
parent 3a80bc476e
commit 224f37b374
3 changed files with 15 additions and 8 deletions
+6 -2
View File
@@ -110,6 +110,10 @@ async function generateTranscript(channel, user) {
const filePath = path.join(transcriptsDir, `${channel.id}.html`);
fs.writeFileSync(filePath, html, 'utf8');
// === Lecture domaine/port depuis .env ===
const DOMAIN = process.env.TRANSCRIPT_DOMAIN || 'http://localhost';
const PORT = process.env.TRANSCRIPT_PORT || 3000;
// Logs
const logChannel = await channel.client.channels
.fetch(config.logsChannel)
@@ -126,7 +130,7 @@ async function generateTranscript(channel, user) {
},
{
name: 'Transcript',
value: `http://localhost:3000/transcript/${channel.id}`,
value: `${DOMAIN}:${PORT}/transcript/${channel.id}`,
}
)
.setColor(0xe74c3c)
@@ -141,4 +145,4 @@ async function closeTicketWithTranscript(channel, user) {
await channel.delete().catch(() => {});
}
module.exports = { closeTicketWithTranscript };
module.exports = { closeTicketWithTranscript };