Skip to content

evvv-amine/evv-amine.dev-bot-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Ticket Bot

A professional Discord Ticket Bot built with discord.js v14+ using Discord Components V2 for a modern, embed-free UI.

Features

  • Modern UI using Discord Components V2 (Containers, TextDisplay, Separator, ActionRow)
  • No EmbedBuilder — everything uses native Components V2
  • Slash command /panel to 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

Project Structure

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

Prerequisites

  • Node.js 18+
  • A Discord bot application with the following intents:
    • Guilds
    • GuildMessages
    • GuildMembers
    • MessageContent
  • Bot permissions in your server:
    • Manage Channels
    • Send Messages
    • Manage Messages
    • View Channels
    • Read Message History
    • Attach Files
    • Embed Links

Installation

  1. Clone the repository
git clone https://github.com/your-username/discord-ticket-bot.git
cd discord-ticket-bot
  1. Install dependencies
npm install
  1. Configure environment variables

Copy .env.example to .env:

cp .env.example .env

Edit .env and fill in:

DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_bot_client_id_here
GUILD_ID=your_guild_id_here
  1. 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",
  1. Deploy slash commands
npm run deploy
  1. Start the bot
npm start

Usage

  1. In your Discord server, type /panel (requires Administrator permission)
  2. The ticket panel will appear with a category dropdown
  3. Select a category to open a ticket modal
  4. Fill in the subject and description
  5. A private ticket channel is created with management buttons

Ticket 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

Transcript

Transcripts are:

  • Generated as styled HTML files
  • Saved to the transcripts/ directory
  • Sent to the configured transcript channel
  • Attached before channel deletion

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors