mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
feat: include category name in transcripts
This commit is contained in:
parent
0fa45e3e50
commit
4dbbba6c0b
@ -49,7 +49,7 @@ module.exports = class TicketCompleter extends Autocompleter {
|
|||||||
});
|
});
|
||||||
tickets = tickets.map(ticket => {
|
tickets = tickets.map(ticket => {
|
||||||
const date = new Date(ticket.createdAt).toLocaleString([locale, 'en-GB'], { dateStyle: 'short' });
|
const date = new Date(ticket.createdAt).toLocaleString([locale, 'en-GB'], { dateStyle: 'short' });
|
||||||
const topic = ticket.topic ? '- ' + decrypt(ticket.topic).substring(0, 50) : '';
|
const topic = ticket.topic ? '- ' + decrypt(ticket.topic).replace(/\n/, ' ').substring(0, 50) : '';
|
||||||
const category = emoji.hasEmoji(ticket.category.emoji) ? emoji.get(ticket.category.emoji) + ' ' + ticket.category.name : ticket.category.name;
|
const category = emoji.hasEmoji(ticket.category.emoji) ? emoji.get(ticket.category.emoji) + ' ' + ticket.category.name : ticket.category.name;
|
||||||
ticket._name = `${category} #${ticket.number} (${date}) ${topic}`;
|
ticket._name = `${category} #${ticket.number} (${date}) ${topic}`;
|
||||||
return ticket;
|
return ticket;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
* ID: {{ ticket.id }}
|
* ID: {{ ticket.id }} ({{ guildName }})
|
||||||
* Number: {{ guildName }} #{{ ticket.number }}
|
* Number: {{ ticket.category.name }} #{{ ticket.number }}
|
||||||
* Topic: {{ #ticket.topic }}{{ . }}{{ /ticket.topic }}{{ ^ticket.topic }}(no topic){{ /ticket.topic }}
|
* Topic: {{ #ticket.topic }}{{ . }}{{ /ticket.topic }}{{ ^ticket.topic }}(no topic){{ /ticket.topic }}
|
||||||
* Created on: {{ #ticket }}{{ createdAtFull }}{{ /ticket }}
|
* Created on: {{ #ticket }}{{ createdAtFull }}{{ /ticket }}
|
||||||
* Created by: {{ #ticket.createdBy }}"{{ displayName }}" @{{ username }}#{{ discriminator }}{{ /ticket.createdBy }}
|
* Created by: {{ #ticket.createdBy }}"{{ displayName }}" @{{ username }}#{{ discriminator }}{{ /ticket.createdBy }}
|
||||||
|
Loading…
Reference in New Issue
Block a user