Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tickets- Include ticket Title in transcripts #625

Merged
merged 2 commits into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions premium/assets/premium.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ <h2 class="card-title">Info</h2>
<li>Max Reddit feeds increased from 100 to 1000</li>
<li>Max Youtube feeds increased from 50 to 250 (Possibly higher if needed)</li>
<li>Max Soundboard sounds increased from 50 to 250 (Possibly higher if needed)</li>
<li>Increased database storage and interaction limits.</li>
</ul>
</div>
</section>
Expand Down
6 changes: 3 additions & 3 deletions tickets/tickets_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ func createLogs(gs *dstate.GuildState, conf *models.TicketConfig, ticket *models
formattedTranscript := createTXTTranscript(ticket, msgs)

channel := transcriptChannel(conf, adminOnly)
_, err := common.BotSession.ChannelFileSendWithMessage(channel, fmt.Sprintf("transcript-%d.txt", ticket.LocalID), fmt.Sprintf("transcript-%d.txt", ticket.LocalID), formattedTranscript)
_, err := common.BotSession.ChannelFileSendWithMessage(channel, fmt.Sprintf("transcript-%d-%s.txt", ticket.LocalID, ticket.Title), fmt.Sprintf("transcript-%d-%s.txt", ticket.LocalID, ticket.Title), formattedTranscript)
if err != nil {
return err
}
Expand All @@ -548,7 +548,7 @@ func archiveAttachments(conf *models.TicketConfig, ticket *models.Ticket, groups
continue
}

fName := fmt.Sprintf("attachments-%d-%s", ticket.LocalID, ag[0].Filename)
fName := fmt.Sprintf("attachments-%d-%s-%s", ticket.LocalID, ticket.Title, ag[0].Filename)
_, err = common.BotSession.ChannelFileSendWithMessage(transcriptChannel(conf, adminOnly),
fName, fName, resp.Body)
continue
Expand Down Expand Up @@ -581,7 +581,7 @@ func archiveAttachments(conf *models.TicketConfig, ticket *models.Ticket, groups
}

zw.Close()
fname := fmt.Sprintf("attachments-%d.zip", ticket.LocalID)
fname := fmt.Sprintf("attachments-%d-%s.zip", ticket.LocalID, ticket.Title)
_, err := common.BotSession.ChannelFileSendWithMessage(transcriptChannel(conf, adminOnly), fname, fname, &buf)
buf.Reset()

Expand Down