{"id":16226275,"url":"https://github.com/ghostdevv/djs-ticketsystem","last_synced_at":"2025-03-19T13:30:38.213Z","repository":{"id":46688366,"uuid":"286776866","full_name":"ghostdevv/djs-ticketsystem","owner":"ghostdevv","description":"DJS-TicketSystem is an extension to discord.js designed to make creating \"tickets\" in discord servers easier","archived":false,"fork":false,"pushed_at":"2021-10-05T10:24:54.000Z","size":1164,"stargazers_count":7,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-27T09:27:43.977Z","etag":null,"topics":["discord-tickets"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ghostdevv.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"ghostdevv","patreon":"onlyspaceghost","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://ghostdev.xyz/donate"}},"created_at":"2020-08-11T15:13:48.000Z","updated_at":"2021-10-01T19:29:00.000Z","dependencies_parsed_at":"2022-08-24T21:50:24.538Z","dependency_job_id":null,"html_url":"https://github.com/ghostdevv/djs-ticketsystem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fdjs-ticketsystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fdjs-ticketsystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fdjs-ticketsystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Fdjs-ticketsystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostdevv","download_url":"https://codeload.github.com/ghostdevv/djs-ticketsystem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989578,"owners_count":20379648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-tickets"],"created_at":"2024-10-10T12:48:38.452Z","updated_at":"2025-03-19T13:30:37.890Z","avatar_url":"https://github.com/ghostdevv.png","language":"JavaScript","readme":"\n\n# DJS-TicketSystem\n[![](https://img.shields.io/npm/v/djs-ticketsystem?label=Latest%20Version\u0026style=for-the-badge\u0026logo=npm\u0026color=informational)](https://www.npmjs.com/package/dashargs)\n[![](https://img.shields.io/static/v1?label=Author\u0026message=GHOST\u0026color=informational\u0026style=for-the-badge)](https://ghostdev.xyz)\n\nDJS-TicketSystem is a package designed to make creating \"tickets\" in discord servers easier\n\n## Install\n```\nnpm install --save djs-ticketsystem\n```\n\n## Setup\nTo setup djs-ticketsystem add this code at the top of your index file\n```js\nconst ticketSystem = require('djs-ticketsystem');\n```\nFor example:\n```js\nconst ticketSystem = require('djs-ticketsystem');\nconst { Client } = require('discord.js');\n\nconst client = new Client();\n\nclient.on('ready', () =\u003e console.log('Online!'));\n\nclient.on('message', message =\u003e {\n    if (message.content == '-ticket') {\n        message.guild.createTicket({ owner: message.author })\n            .catch(console.error);\n    };\n});\n\nclient.login('token');\n```\n\n## Create a ticket\n`\u003cguild\u003e.createTicket({ options });`\u003cbr\u003e\nWhere `\u003cguild\u003e` is the guild class (see below if you are unsure)\n#### Options\n`name` This is the name of the ticket. You can use custom variables here (see below)\u003cbr\u003e\n`owner` **REQUIRED** This is the owner of the ticket. It must be a user.\u003cbr\u003e\n`category` This is the category the the ticket it is. It can be either a id, name, or category object.\u003cbr\u003e\n`type` This is the type of ticket it is. The default is text.\u003cbr\u003e\n`nsfw` Boolean to show whether the ticket is nsfw or not.\u003cbr\u003e\n`bitrate` The bitrate. Voice tickets only.\u003cbr\u003e\n`userLimit` The user limit. Voice tickets only.\u003cbr\u003e\n`permissionOverwrites` The permission data for the ticket.\u003cbr\u003e\n`position` The position of the ticket.\u003cbr\u003e\n`rateLimitPerUser` The slowmode setting of the ticket.\u003cbr\u003e\n`reason` The reason for opening the ticket.\u003cbr\u003e\n`openMessage.text` If you want to send a message in the ticket when it opens.\u003cbr\u003e\n`openMessage.embed` If you want to send an embed in the ticket when it opens.\n\nThe default config is\n```js\n{\n    name: 'ticket-{OWNER.USERNAME}',\n    type: 'text',\n    nsfw: false,\n    permissionOverwrites: [\n        {\n            id: '{OWNER.ID}',\n            allow: ['CREATE_INSTANT_INVITE', 'KICK_MEMBERS', 'BAN_MEMBERS', 'ADMINISTRATOR', 'MANAGE_CHANNELS', 'MANAGE_GUILD', 'ADD_REACTIONS', 'VIEW_AUDIT_LOG', 'PRIORITY_SPEAKER', 'STREAM', 'VIEW_CHANNEL', 'SEND_MESSAGES', 'SEND_TTS_MESSAGES', 'MANAGE_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'READ_MESSAGE_HISTORY', 'MENTION_EVERYONE', 'USE_EXTERNAL_EMOJIS', 'VIEW_GUILD_INSIGHTS', 'CONNECT', 'SPEAK', 'MUTE_MEMBERS', 'DEAFEN_MEMBERS', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'MANAGE_NICKNAMES', 'MANAGE_ROLES', 'MANAGE_WEBHOOKS', 'MANAGE_EMOJIS' ]\n        },\n        {\n            id: '{GUILD.ID}',\n            deny: ['CREATE_INSTANT_INVITE', 'KICK_MEMBERS', 'BAN_MEMBERS', 'ADMINISTRATOR', 'MANAGE_CHANNELS', 'MANAGE_GUILD', 'ADD_REACTIONS', 'VIEW_AUDIT_LOG', 'PRIORITY_SPEAKER', 'STREAM', 'VIEW_CHANNEL', 'SEND_MESSAGES', 'SEND_TTS_MESSAGES', 'MANAGE_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'READ_MESSAGE_HISTORY', 'MENTION_EVERYONE', 'USE_EXTERNAL_EMOJIS', 'VIEW_GUILD_INSIGHTS', 'CONNECT', 'SPEAK', 'MUTE_MEMBERS', 'DEAFEN_MEMBERS', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'MANAGE_NICKNAMES', 'MANAGE_ROLES', 'MANAGE_WEBHOOKS', 'MANAGE_EMOJIS' ]\n            }\n    ],\n    openMessage: {\n        embed: new MessageEmbed().setColor('RANDOM').setDescription('Welcome to your ticket {OWNER}')\n    },\n}\n```\n\n#### Custom variables\nThere are custom variables built in that allow for easily including data in messages. You are able to use them on permissionOverwrites id as seen above, and in the openingMessage embed and/or text.\u003cbr\u003e\n`{OWNER}` Used if you want to mention the owner\u003cbr\u003e\n`{OWNER.USERNAME}` Used if you want to display the owner's username\u003cbr\u003e\n`{OWNER.TAG}` Used if you want to display the owner's tag\u003cbr\u003e\n`{OWNER.DISCRIMINATOR}` Used if you want to display the owner's discriminator\u003cbr\u003e\n`{OWNER.ID}` Used if you want to display the owner's id\u003cbr\u003e\n`{GUILD}` Used if you want to display the guild\u003cbr\u003e\n`{GUILD.ID}` Used if you want to display the guild's id\u003cbr\u003e\n`{GUILD.NAME}` Used if you want to display the guild's name\u003cbr\u003e\n\n#### Examples of where to create a ticket\n```js\nclient.on('message', message =\u003e {\n    if (message.content == '-ticket') {\n        message.guild.createTicket({ owner: message.author })\n            .catch(console.error);\n    };\n});\n```\n\n## Other Methods\n`\u003cchannel\u003e.isTicket()`\u003cbr\u003e\nFor Example\n```js\nclient.on('message', message =\u003e {\n    if (message.content == 'close' \u0026\u0026 message.channel.isTicket()) {\n        console.log('Closed a ticket channel!');\n        message.channel.delete();\n    }\n});\n```\n`ticketSystem.defaults({ options })`\u003cbr\u003e\nYou are able to edit the default options using this method\u003cbr\u003e\nFor Example\n```js\nconst ticketSystem = require('djs-ticketsystem');\n\nticketSystem.defaults({\n    name: 'ticket-{OWNER.USERNAME}-{OWNER.DISCRIMINATOR}'\n});\n```\n\n## Support\n\nYou can message me on discord: `GHOST#7524` or create a issue on the [github](https://github.com/ghostdevv/djs-ticketsystem)\n","funding_links":["https://github.com/sponsors/ghostdevv","https://patreon.com/onlyspaceghost","https://ghostdev.xyz/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Fdjs-ticketsystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostdevv%2Fdjs-ticketsystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Fdjs-ticketsystem/lists"}