mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
Helptickets: Properly log claim duration for text tickets
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
This commit is contained in:
parent
f420a8ee12
commit
ffe2f3111b
|
|
@ -39,6 +39,7 @@ export interface TicketState {
|
|||
type: string;
|
||||
created: number;
|
||||
claimed: string | null;
|
||||
claimTime?: number;
|
||||
ip: string;
|
||||
needsDelayWarning?: boolean;
|
||||
offline?: boolean;
|
||||
|
|
@ -2523,8 +2524,9 @@ export const commands: Chat.ChatCommands = {
|
|||
if (tarUser) {
|
||||
HelpTicket.notifyResolved(tarUser, ticket, ticketId);
|
||||
}
|
||||
const duration = Date.now() - (ticket.state?.claimTime || ticket.created);
|
||||
// ticketType\ttotalTime\ttimeToFirstClaim\tinactiveTime\tresolution\tresult\tstaff,userids,separated,with,commas
|
||||
writeStats(`${ticket.type}\t${Date.now() - ticket.created}\t0\t0\tresolved\tvalid\t${user.id}`);
|
||||
writeStats(`${ticket.type}\t${duration}\t0\t0\tresolved\tvalid\t${user.id}`);
|
||||
this.popupReply(`You resolved ${ticketId}'s ticket.`);
|
||||
await HelpTicket.modlog({
|
||||
action: 'TEXTTICKET CLOSE',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user