# TreyStock Ticket Bot — Sales Description
**TreyStock Advanced Ticket Bot** — a complete, production-ready Discord ticket system in a single Python file. Drop in your token, run it, and you have a full support desk running in under a minute.
## What it does
A polished purple-and-white ticket system built for shops and service servers. Customers pick a category from a dropdown panel, get a private channel instantly, and staff handle everything with one-click buttons — no commands required.
## Key features
**🎫 Smart ticket panel** — Four built-in categories (Purchase Support, Restock Request, Replacement, General Support), each with its own emoji, description, and channel prefix. Every ticket type routes to its own Discord category automatically.
**🔘 Persistent buttons** — Claim, Done, and Close buttons survive bot restarts. No re-posting panels after every update.
**✅ Order completion flow** — `/done` renames the channel with a ✅ prefix, moves it to your completed category, pings the customer, and automatically requests a 5-star vouch with a direct clickable link to your vouch channel.
**📄 HTML transcripts** — Every closed ticket generates a standalone, dark-themed HTML transcript (up to 5,000 messages) with authors, timestamps, attachments, and embeds preserved. Delivered straight to your transcript log.
**⚙️ In-Discord settings panel** — A paginated `/settings` menu with live dropdowns for categories, per-type routing, log channels, owner roles, staff roles, and the vouch channel. Changes save instantly to disk. Zero code editing needed.
**👑 Two-tier permissions** — Separate owner and staff role systems. Owners configure and delete; staff claim, complete, and manage. Auto-bootstraps from Manage Server so you're never locked out.
**🔒 Close confirmation** — Nobody nukes a ticket by accident. Every close asks first, then archives with a reason and full logging.
**🔓 Reopen support** — Closed and completed tickets can be restored to their original category with permissions intact.
## Also included
- Anti-spam limit (one open ticket per user)
- Full audit logging: opened, claimed, completed, closed, deleted
- `/add` and `/remove` to manage ticket participants
- Automatic slash command syncing on join
- Atomic JSON config with crash-safe writes
- Graceful permission-error handling with clear user-facing messages
- Fully branded embeds with your logo, invite link, and copyright footer
## Technical
- **Single file** — no folder structure, no database, no dependencies beyond `discord.py`
- **Python 3.10+** / `discord.py >= 2.3`
- **No privileged intents required** — works out of the box
- Type-hinted, documented, and cleanly structured throughout
- Token via constant or environment variable
## Setup
1. `pip install -U "discord.py>=2.3"`
2. Paste your token
3. `python main.py`
4. Run `/settings` and `/panel`
Rebrand it in seconds — colors, name, logo, and links are all constants at the top of the file.
In Stock
In Stock
Out of Stock