A lightweight, modular Discord ticket bot with slash commands, position management, and rich interaction handling.
| Feature | What you get |
|---|---|
| 🎫 Ticket System | Create, manage, and close support tickets with slash commands. |
| 👥 Position Management | Add and remove hiring positions dynamically. |
| 🧾 User Tracking | Track ticket owners and position applicants in local storage. |
| ⚡ Slash Commands | Modern /ticket, /close, /positions command suite. |
| 🗂️ Modular Managers | Dedicated managers for tickets, positions, and users. |
| 💾 JSON Storage | Lightweight local file storage auto-created at runtime. |
.
├── src/ # Source code
│ ├── commands/ # Slash commands
│ │ ├── ticket.js # Create support tickets
│ │ ├── close.js # Close active tickets
│ │ ├── add.js # Add hiring positions
│ │ ├── remove.js # Remove hiring positions
│ │ ├── positions.js # View available positions
│ │ └── ping.js # Bot health check
│ ├── events/ # Discord event handlers
│ │ ├── interactionCreate.js # Handle slash commands & interactions
│ │ └── ready.js # Startup sync
│ ├── managers/
│ │ ├── TicketManager.js # Ticket lifecycle management
│ │ ├── PositionsManager.js # Position CRUD operations
│ │ └── TicketUsersManager.js# User/applicant tracking
│ ├── config/
│ │ ├── config.json # Bot configuration
│ │ └── config.json.example # Bot configuration template
│ └── index.js # Bot entry point
├── data/ # Auto-created JSON storage
│ ├── positions.json # Hiring positions data
│ └── ticket-users.json # User & applicant tracking
├── .env.example # Environment variable template
├── package.json # Dependencies & metadata
├── LICENSE # MIT License
└── README.md
Estimated setup time: 5–10 minutes
npm installRename .env.example to .env and fill in:
TOKEN=your_bot_token_here
CLIENT_ID=your_client_id_here
GUILD_ID=your_guild_id_hereRename src/config.json.example to src/config.json and set your server-specific settings:
{
"ticketChannelId": "your_ticket_channel_id",
"supportRoleId": "your_support_role_id",
"logChannelId": "your_log_channel_id"
}node src/index.jsRequires Manage Server permissions unless otherwise noted.
| Command | Purpose | Permissions |
|---|---|---|
/ticket |
Create a new support ticket. | Everyone |
/close |
Close an active ticket. | Ticket owner or staff |
/positions add |
Add a new hiring position. | Manage Server |
/positions remove |
Remove a hiring position. | Manage Server |
/positions |
View all available positions. | Everyone |
/ping |
Check bot responsiveness. | Everyone |
Enable these in the Discord Developer Portal:
- Server Members Intent
- Message Content Intent
- View Channels
- Send Messages
- Embed Links
- Read Message History
- Manage Channels (for ticket creation)
The bot stores lightweight JSON files at runtime in the data/ folder. Directories are created automatically:
data/positions.json— hiring positions & metadatadata/ticket-users.json— user tracking & applicants
For multi-server persistence or production use, consider migrating to a real database.
| Area | Details |
|---|---|
| Slash Commands | Registered globally on startup. |
| Ticket Management | Uses snowflake IDs for reliable tracking. |
| Position Data | Stored as JSON objects with timestamps. |
MIT
Discord: @007codename