feat(archives): update transcript template

so it can actually be parsed as markdown if wanted
This commit is contained in:
Isaac 2022-10-24 23:53:42 +01:00
parent 353b232dcd
commit 066eb954e3
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33
3 changed files with 31 additions and 27 deletions

View File

@ -51,7 +51,7 @@ module.exports = class TranscriptSlashCommand extends SlashCommand {
Mustache.escape = text => text; // don't HTML-escape
this.template = fs.readFileSync(
join('./user/templates/', this.client.config.templates.transcript),
join('./user/templates/', this.client.config.templates.transcript + '.mustache'),
{ encoding: 'utf8' },
);
}

View File

@ -1,26 +0,0 @@
#{{ channelName }} ticket transcript
---
ID: {{ ticket.id }}
Number: {{ guildName }} #{{ ticket.number }}
Topic: {{ #ticket.topic }}{{ . }}{{ /ticket.topic }}{{ ^ticket.topic }}(no topic){{ /ticket.topic }}
Created on: {{ #ticket }}{{ createdAtFull }}{{ /ticket }}
Created by: {{ #ticket.createdBy }}"{{ displayName }}" @{{ username }}#{{ discriminator }}{{ /ticket.createdBy }}
Closed on: {{ #ticket }}{{ closedAtFull }}{{ /ticket }}
Closed by: {{ #ticket.closedBy }}"{{ displayName }}" @{{ username }}#{{ discriminator }}{{ /ticket.closedBy }}{{ ^ticket.closedBy }}(automated){{ /ticket.closedBy }}
Closed because: {{ #ticket.closedReason }}{{ ticket.closedReason }}{{ /ticket.closedReason }}{{ ^ticket.closedReason }}(no reason){{ /ticket.closedReason }}
Claimed by: {{ #ticket.claimedBy }}"{{ displayName }}" @{{ username }}#{{ discriminator }}{{ /ticket.claimedBy }}{{ ^ticket.claimedBy }}(not claimed){{ /ticket.claimedBy }}
{{ #ticket.feedback }}
Feedback:
Rating: {{ rating }}/5
Comment: {{ comment }}{{ ^comment }}(no comment){{ /comment }}
{{ /ticket.feedback }}
Participants:
{{ #ticket.archivedUsers }}
- "{{ displayName }}" @{{ username }}#{{ discriminator }} ({{ userId }})
{{ /ticket.archivedUsers }}
Pinned messages: {{ #pinned }}{{ . }}{{ /pinned }}
---
{{ #ticket.archivedMessages }}
<{{ number }}> [{{ createdAtTimestamp }}] {{author.displayName}}: {{ text }}
{{ /ticket.archivedMessages }}

View File

@ -0,0 +1,30 @@
#{{ channelName }} ticket transcript
---
* ID: {{ ticket.id }}
* Number: {{ guildName }} #{{ ticket.number }}
* Topic: {{ #ticket.topic }}{{ . }}{{ /ticket.topic }}{{ ^ticket.topic }}(no topic){{ /ticket.topic }}
* Created on: {{ #ticket }}{{ createdAtFull }}{{ /ticket }}
* Created by: {{ #ticket.createdBy }}"{{ displayName }}" @{{ username }}#{{ discriminator }}{{ /ticket.createdBy }}
* Closed on: {{ #ticket }}{{ closedAtFull }}{{ /ticket }}
* Closed by: {{ #ticket.closedBy }}"{{ displayName }}" @{{ username }}#{{ discriminator }}{{ /ticket.closedBy }}{{ ^ticket.closedBy }}(automated){{ /ticket.closedBy }}
* Closed because: {{ #ticket.closedReason }}{{ ticket.closedReason }}{{ /ticket.closedReason }}{{ ^ticket.closedReason }}(no reason){{ /ticket.closedReason }}
* Claimed by: {{ #ticket.claimedBy }}"{{ displayName }}" @{{ username }}#{{ discriminator }}{{ /ticket.claimedBy }}{{ ^ticket.claimedBy }}(not claimed){{ /ticket.claimedBy }}
{{ #ticket.feedback }}
* Feedback:
* Rating: {{ rating }}/5
* Comment: {{ comment }}{{ ^comment }}(no comment){{ /comment }}
{{ /ticket.feedback }}
* Participants:
{{ #ticket.archivedUsers }}
* "{{ displayName }}" @{{ username }}#{{ discriminator }} ({{ userId }})
{{ /ticket.archivedUsers }}
* Pinned messages: {{ #pinned }}{{ . }}{{ /pinned }}
---
{{ #ticket.archivedMessages }}
<{{ number }}> [{{ createdAtTimestamp }}] {{author.displayName}}: {{ text }}
{{ /ticket.archivedMessages }}