mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix: new line replacement
This commit is contained in:
parent
4dbbba6c0b
commit
cf6b34785c
@ -49,7 +49,7 @@ module.exports = class TicketCompleter extends Autocompleter {
|
||||
});
|
||||
tickets = tickets.map(ticket => {
|
||||
const date = new Date(ticket.createdAt).toLocaleString([locale, 'en-GB'], { dateStyle: 'short' });
|
||||
const topic = ticket.topic ? '- ' + decrypt(ticket.topic).replace(/\n/, ' ').substring(0, 50) : '';
|
||||
const topic = ticket.topic ? '- ' + decrypt(ticket.topic).replace(/\n/g, ' ').substring(0, 50) : '';
|
||||
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}`;
|
||||
return ticket;
|
||||
|
@ -70,7 +70,7 @@ module.exports = class TranscriptSlashCommand extends SlashCommand {
|
||||
|
||||
if (ticket.closedReason) ticket.closedReason = decrypt(ticket.closedReason);
|
||||
if (ticket.feedback?.comment) ticket.feedback.comment = decrypt(ticket.feedback.comment);
|
||||
if (ticket.topic) ticket.topic = decrypt(ticket.topic);
|
||||
if (ticket.topic) ticket.topic = decrypt(ticket.topic).replace(/\n/g, '\n\t');
|
||||
|
||||
ticket.archivedUsers.forEach((user, i) => {
|
||||
if (user.displayName) user.displayName = decrypt(user.displayName);
|
||||
|
Loading…
Reference in New Issue
Block a user