A professional Discord Ticket Bot built with discord.js v14+ using Discord Components V2 for a modern, embed-free UI.
- Modern UI using Discord Components V2 (Containers, TextDisplay, Separator, ActionRow)
- No EmbedBuilder — everything uses native Components V2
- Slash command
/panelto deploy the ticket system - Category dropdown with 6 ticket types
- Modal-based ticket creation
- Full ticket management: Claim, Unclaim, Add/Remove Member, Close, Reopen, Delete
- HTML transcript generation with styled output
- Permission-based access control (staff vs ticket owner)
- Error handling with user-friendly messages
- Modular, production-ready codebase
src/
├── commands/
│ ├── panel.js # /panel slash command
│ └── ping.js # /ping command
├── events/
│ ├── ready.js # Bot ready event
│ └── interactionCreate.js # Interaction router
├── interactions/
│ ├── buttons/
│ │ ├── claim.js # Claim ticket
│ │ ├── unclaim.js # Unclaim ticket
│ │ ├── addMember.js # Add member to ticket
│ │ ├── removeMember.js # Remove member from ticket
│ │ ├── close.js # Close ticket (with confirmation)
│ │ ├── confirmClose.js # Confirm close action
│ │ ├── cancelClose.js # Cancel close action
│ │ ├── reopen.js # Reopen closed ticket
│ │ ├── delete.js # Delete ticket (with confirmation)
│ │ ├── confirmDelete.js # Confirm delete action
│ │ ├── cancelDelete.js # Cancel delete action
│ │ └── transcript.js # Generate HTML transcript
│ ├── selectMenus/
│ │ └── categorySelect.js # Category dropdown handler
│ └── modals/
│ └── ticketModal.js # Ticket creation modal
├── containers/
│ └── panelContainer.js # All UI container builders
├── utils/
│ ├── permissions.js # Permission & ticket data helpers
│ └── transcript.js # HTML transcript generator
├── deploy-commands.js # Slash command registration
└── index.js # Bot entry point
- Node.js 18+
- A Discord bot application with the following intents:
GuildsGuildMessagesGuildMembersMessageContent
- Bot permissions in your server:
Manage ChannelsSend MessagesManage MessagesView ChannelsRead Message HistoryAttach FilesEmbed Links
- Clone the repository
git clone https://github.com/your-username/discord-ticket-bot.git
cd discord-ticket-bot- Install dependencies
npm install- Configure environment variables
Copy .env.example to .env:
cp .env.example .envEdit .env and fill in:
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_bot_client_id_here
GUILD_ID=your_guild_id_here- Configure the bot
Edit config.js and set:
supportRoleId: "YOUR_SUPPORT_ROLE_ID",
ticketCategoryId: "YOUR_TICKET_CATEGORY_ID",
transcriptChannelId: "YOUR_TRANSCRIPT_CHANNEL_ID",
logChannelId: "YOUR_LOG_CHANNEL_ID",- Deploy slash commands
npm run deploy- Start the bot
npm start- In your Discord server, type
/panel(requires Administrator permission) - The ticket panel will appear with a category dropdown
- Select a category to open a ticket modal
- Fill in the subject and description
- A private ticket channel is created with management buttons
| Button | Permission | Description |
|---|---|---|
| Claim | Staff only | Assign yourself to the ticket |
| Unclaim | Staff only (claimer) | Remove your claim |
| Add Member | Staff only | Info on adding members |
| Remove Member | Staff only | Info on removing members |
| Close | Owner or Staff | Close the ticket (confirmation required) |
| Reopen | Staff only | Reopen a closed ticket |
| Delete | Staff only | Delete the ticket (confirmation required) |
| Transcript | Everyone | Generate HTML transcript |
Transcripts are:
- Generated as styled HTML files
- Saved to the
transcripts/directory - Sent to the configured transcript channel
- Attached before channel deletion
MIT