{"id":50865136,"url":"https://github.com/jevenchy/ticket","last_synced_at":"2026-06-15T00:06:37.974Z","repository":{"id":364847759,"uuid":"1269436359","full_name":"jevenchy/ticket","owner":"jevenchy","description":"A simple Discord bot for support tickets with private channels and button controls.","archived":false,"fork":false,"pushed_at":"2026-06-14T18:17:39.000Z","size":175,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T20:11:37.340Z","etag":null,"topics":["discord-bot","support-bot","ticket-bot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jevenchy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-14T17:59:21.000Z","updated_at":"2026-06-14T18:54:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jevenchy/ticket","commit_stats":null,"previous_names":["jevenchy/ticket"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/jevenchy/ticket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevenchy%2Fticket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevenchy%2Fticket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevenchy%2Fticket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevenchy%2Fticket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jevenchy","download_url":"https://codeload.github.com/jevenchy/ticket/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jevenchy%2Fticket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34342123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord-bot","support-bot","ticket-bot"],"created_at":"2026-06-15T00:06:37.336Z","updated_at":"2026-06-15T00:06:37.965Z","avatar_url":"https://github.com/jevenchy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ticket\n\nA simple Discord bot for support tickets with private channels and button controls.\n\n## How it Works\n\n- **Startup**: posts a fresh ticket panel in `TICKET_PANEL_CHANNEL_ID`, replacing the old one.\n- **Opening**: picking a type opens a private channel under `TICKET_CATEGORY_ID`.\n- **Closing**: Close locks the channel and shows Reopen, Transcript, and Delete.\n- **Transcript**: staff send a `.txt` log to `TICKET_TRANSCRIPT_CHANNEL_ID` and archive the ticket.\n- **Reopening**: staff unlock a closed ticket.\n- **Deletion**: staff remove the ticket channel.\n- **Auto-close**: inactive tickets close after `TICKET_SETTINGS.autoCloseHours`.\n- **Auto-delete**: closed or archived tickets idle past `TICKET_SETTINGS.autoDeleteHours` are removed, saving a transcript first if one was not sent yet.\n\n## Permissions\n\nInvite with the `bot` scope only (no slash commands). Grant **Manage Channels**, **Manage Roles**, **View Channel**, **Send Messages**, **Embed Links**, **Attach Files**, **Read Message History**, and **Manage Messages**.\n\nUse this invite link directly, replacing `\u003cclient-id\u003e` with your application's client ID:\n\n```\nhttps://discord.com/api/oauth2/authorize?client_id=\u003cclient-id\u003e\u0026permissions=268561424\u0026scope=bot\n```\n\n## Setup\n\nRequires Node.js 22 or newer.\n\n```bash\nnpm install\ncp .env.example .env\n```\n\nEdit `.env` with your bot credentials:\n\n```env\nDISCORD_TOKEN=...\nTICKET_CATEGORY_ID=...\nTICKET_PANEL_CHANNEL_ID=...\nTICKET_TRANSCRIPT_CHANNEL_ID=...\nTICKET_STAFF_ROLE_IDS=...\n```\n\nEdit `src/config/ticketConfig.ts` to tweak:\n\n- `embedColor` - ticket embed color\n- `autoCloseHours` - inactivity period before auto-close\n- `autoCloseCheckIntervalMinutes` - how often to check for inactive tickets\n- `shouldAutoDelete` - enable auto-deletion of closed and archived tickets\n- `autoDeleteHours` - inactivity period before a closed or archived ticket is deleted\n- `maxOpenPerUser` - max open tickets per member\n- `shouldDmOnClose` - DM the opener when their ticket is closed\n- `dmOnCloseMessage` - the close DM text\n- `deleteDelaySeconds` - delay before the channel is deleted\n- `TICKET_TYPES` - dropdown types (`id`, `label`, `description`, `welcomeMessage`)\n\nThe panel embed uses `img/ticket.png` as its thumbnail - replace that file to use your own image.\n\nStart the bot:\n\n```bash\nnpm start\n```\n\n## File Structure\n\n```\nticket/\n├── .env.example\n├── img/\n│   └── ticket.png     # Panel embed thumbnail\n└── src/\n    ├── core/          # Discord client setup and login\n    ├── events/        # Discord event listeners\n    ├── interactions/  # Button and select menu handlers\n    ├── handlers/      # Interaction routing, error handling\n    ├── services/      # Ticket lifecycle, transcripts, auto-close\n    ├── embeds/        # Embed and component builders\n    ├── utils/         # Logger, channel fetch, permission\n    ├── types/         # Shared type definitions\n    ├── constants/     # Colors and customId strings\n    ├── config/        # Env vars and ticket settings\n    └── index.ts       # Entry point (process lifecycle)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjevenchy%2Fticket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjevenchy%2Fticket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjevenchy%2Fticket/lists"}