added ticket channel id for closed tickets (#496)

* added ticket channel id for closed tickets

* Update tickets.js

* Fix \` + "\`" + \`

---------

Co-authored-by: Isaac <git@eartharoid.me>
This commit is contained in:
Marius 2023-10-27 21:14:48 +02:00 committed by GitHub
parent 6b8cd9eb29
commit e6a527633a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ module.exports = class TicketsSlashCommand extends SlashCommand {
name: getMessage('commands.slash.tickets.response.fields.closed.name'), name: getMessage('commands.slash.tickets.response.fields.closed.name'),
value: closed.map(ticket => { value: closed.map(ticket => {
const topic = ticket.topic ? `- \`${decrypt(ticket.topic).replace(/\n/g, ' ').slice(0, 30)}\`` : ''; const topic = ticket.topic ? `- \`${decrypt(ticket.topic).replace(/\n/g, ' ').slice(0, 30)}\`` : '';
return `> ${ticket.category.name} #${ticket.number} ${topic}`; return `> ${ticket.category.name} #${ticket.number} (\`${ticket.id}\`) ${topic}`;
}).join('\n'), }).join('\n'),
}); });
} }