Skip to content

Quick Start

Sayrix edited this page Apr 29, 2026 · 3 revisions

This page gets Ticket-Bot running with the fewest steps. Use Installation when you need more detail.

1. Requirements

Install:

  • Git
  • Bun 1.0 or newer

Ticket-Bot can also run built output with Node.js 20 or newer, but the documented setup path uses Bun. For Node.js and npm commands, see Installation.

2. Clone and Install

git clone https://github.com/Sayrix/Ticket-Bot.git
cd Ticket-Bot
bun install

3. Create the Environment File

Create config/.env:

DISCORD_TOKEN=your_bot_token_here
DB_FILE_NAME=file:.data/ticket-bot.db
TICKETPM_PASSKEY=

TICKETPM_PASSKEY is optional unless you want authenticated ticket.pm transcript uploads.

4. Create the Config File

Copy the example config:

cp config/config.example.ts config/config.ts

On Windows PowerShell:

Copy-Item config/config.example.ts config/config.ts

Edit config/config.ts and replace every placeholder ID with real Discord IDs:

  • clientId: your Discord application ID.
  • guildId: your server ID.
  • logs.channelId: the channel for ticket audit logs.
  • staffRoleIds: roles that should manage tickets.
  • categoryId: categories where ticket channels should be created.
  • panels.*.channelId: channels where the bot should post ticket panels.

5. Invite the Bot

In the Discord Developer Portal, create an invite URL with:

  • Scope: bot
  • Scope: applications.commands
  • Permission: Administrator for the simplest setup

The current v4 bot only requests the Guilds gateway intent in code. Privileged intents are not required for the current feature set.

6. Push the Database Schema

bun run drizzle:push

This creates or updates the SQLite/libSQL tables used for tickets and panel tracking.

7. Start the Bot

bun run start

On startup, the bot:

  • Connects to Discord.
  • Deploys slash commands to the configured guild.
  • Validates the guild and panel channels.
  • Syncs ticket panel messages.
  • Applies the configured bot presence.

When the bot is ready, open the configured panel channel and test creating a ticket.

Clone this wiki locally