feat: add ticket/channel ID on closed tickets list (#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 Isaac
parent 6b8cd9eb29
commit cab1b3b6ca
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -105,7 +105,7 @@ module.exports = class TicketsSlashCommand extends SlashCommand {
name: getMessage('commands.slash.tickets.response.fields.closed.name'),
value: closed.map(ticket => {
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'),
});
}