Skip to content

Logging

Sayrix edited this page May 20, 2026 · 3 revisions

Ticket-Bot can send audit logs for ticket actions to a configured Discord channel.

Basic Setup

logs: {
  enabled: true,
  channelId: "171717171717171717"
}

The bot must be able to view and send messages in the log channel.

Event Toggles

You can enable or disable individual log events:

logs: {
  enabled: true,
  channelId: "171717171717171717",
  events: {
    ticketCreate: true,
    ticketClaim: true,
    ticketUnclaim: true,
    ticketClose: true,
    ticketDelete: true,
    userAdded: true,
    userRemoved: true,
    ticketRename: true
  }
}

If events is omitted, every supported log type is enabled.

Supported Events

Event Trigger
ticketCreate A user opens a ticket.
ticketClaim Staff claims a ticket.
ticketUnclaim Staff unclaims a ticket.
ticketClose A ticket is closed.
ticketDelete A closed ticket is deleted or a ticket closes with deletion enabled.
userAdded A user is added with /add or /mass_add.
userRemoved A user is removed with /remove.
ticketRename Staff renames a ticket.

Log Templates

Log message templates live under:

messages/logs/

Examples:

  • messages/logs/ticket-created.ts
  • messages/logs/ticket-closed.ts
  • messages/logs/user-added.ts

You can customize these files the same way as ticket message templates.

Log templates can use:

  • {actorId}
  • {actorMention}
  • {actorName}
  • {claimStatus}
  • {claimerId}
  • {claimerMention}
  • {claimerUsername}
  • {createdAt}
  • {createdById}
  • {createdByMention}
  • {createdByUsername}
  • {reason}
  • {targetId}
  • {targetMention}
  • {targetName}
  • {ticketAge}
  • {ticketChannelId}
  • {ticketChannelMention}
  • {ticketId}
  • {ticketNumber}
  • {ticketTypeKey}
  • {ticketTypeName}
  • {transcriptStatus}
  • {transcriptUrl}
  • {userId}
  • {username}

Clone this wiki locally