https://github.com/creativedevelopments/cdtickets
Easy to use ticket package for Discord.js Bots
https://github.com/creativedevelopments/cdtickets
Last synced: 11 months ago
JSON representation
Easy to use ticket package for Discord.js Bots
- Host: GitHub
- URL: https://github.com/creativedevelopments/cdtickets
- Owner: CreativeDevelopments
- License: mit
- Created: 2021-02-25T13:33:33.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-02T04:03:06.000Z (over 3 years ago)
- Last Synced: 2025-04-09T05:19:56.343Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 83 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Contents
- [Installation](#installation)
- [Setup](#setup)
- [Creating a new ticket](#create-a-ticket)
- [Deleting a ticket](#delete-a-ticket)
- [Unclaim a ticket](#unclaim-a-ticket)
- [Rename a ticket](#rename-a-ticket)
- [Add a member](#add-a-member-to-a-ticket)
- [Remove a member](#remove-a-member-from-a-ticket)
- [Other](#other)
# Installation
```
npm i cdtickets --save
```
# Setup
```js
// Top of the Command File
const CDTickets = require('cdtickets')
const ticket = new CDTickets()
```
## Create a ticket
```js
ticket.create({
msg: message,
name: 'Ticket Name', // Defaults to the ticket owners username
supportRole: 'Role', // Role Name or ID
category: 'Category ID', // If no category is set it will just make a channel at the top of the server
response: 'Response', // This message is sent when they open the ticket - Defaults to "Your ticket has successfully been created in #channel
reason: 'Reason for opening the ticket', // Defaults to "No reason provided"
message: 'Message', // This message is sent when the ticket is opened, will also ping the user and the support role
})
```
## Delete a ticket
```js
ticket.delete({
msg: message
})
```
## Claim a ticket
```js
ticket.claim({
msg: message,
supportRole: 'Role' // Role Name or ID
})
```
## Unclaim a ticket
```js
ticket.unclaim({
msg: message,
supportRole: 'Role', // Role Name or ID
})
```
## Rename a ticket
```js
ticket.rename({
msg: message,
name: 'New Name'
})
```
## Add a member to a ticket
```js
ticket.add({
msg: message,
user: 'User' // message.mentions.members.first() || message.guild.members.cache.get(args[argNumber])
})
```
## Remove a member from a ticket
```js
ticket.remove({
msg: message,
user: 'User' // message.mentions.members.first() || message.guild.members.cache.get(args[argNumber])
})
```
# Other
If you have any questions, suggestions or need helping setting it up join our [Support Server](https://discord.gg/jUNbV5u).
