mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 09:23:07 +02:00
feat(archives): update transcript template
so it can actually be parsed as markdown if wanted
This commit is contained in:
parent
353b232dcd
commit
066eb954e3
@ -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' },
|
||||
);
|
||||
}
|
||||
|
@ -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 }}
|
30
user/templates/transcript.md.mustache
Normal file
30
user/templates/transcript.md.mustache
Normal 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 }}
|
Loading…
Reference in New Issue
Block a user