Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21e3a88b87 | ||
|
|
1451769ebf | ||
|
|
da3017ff95 | ||
|
|
43186c8a0e | ||
|
|
63632e3a66 |
@@ -0,0 +1,65 @@
|
|||||||
|
# changelog
|
||||||
|
|
||||||
|
## v1.3.0
|
||||||
|
### added:
|
||||||
|
- now its possible to create 6 tickets instead of 4
|
||||||
|
- you can edit the number of tickets per user now
|
||||||
|
- you can edit & enable/disable all messages
|
||||||
|
- all embeds are now editable
|
||||||
|
- the color of the button can be changed
|
||||||
|
- updated config.json
|
||||||
|
- updated README.md
|
||||||
|
- a new type of button is here: website links
|
||||||
|
### fixed
|
||||||
|
- nothing at the moment :)
|
||||||
|
### removed
|
||||||
|
- nothing
|
||||||
|
|
||||||
|
## v1.2.2
|
||||||
|
### added:
|
||||||
|
- nothing
|
||||||
|
### fixed:
|
||||||
|
- a bug that caused the `warn "message" event deprecated` to be displayed every time you start the bot in the console.
|
||||||
|
- a visual bug that caused the categories from `!ticket msg` to be displayed in a wrong pattern.
|
||||||
|
### removed:
|
||||||
|
- nothing
|
||||||
|
|
||||||
|
## v1.2.1
|
||||||
|
### added:
|
||||||
|
- you can disable credits in config.json
|
||||||
|
### fixed:
|
||||||
|
- a bug that crashed the bot on startup
|
||||||
|
### removed
|
||||||
|
- nothing
|
||||||
|
|
||||||
|
## v1.2.0
|
||||||
|
### added:
|
||||||
|
- the bot is in english now
|
||||||
|
- you can choose your own ticket options now
|
||||||
|
- added !resetdatabase
|
||||||
|
- updated README.md
|
||||||
|
### fixed:
|
||||||
|
- the first bugs
|
||||||
|
### removed:
|
||||||
|
- some useless commands
|
||||||
|
|
||||||
|
## v1.1.1
|
||||||
|
### added:
|
||||||
|
- added "status" options in config.json
|
||||||
|
### fixed:
|
||||||
|
- fixed a bug where the bot's status could be "playing highmt".
|
||||||
|
### removed:
|
||||||
|
- nothing
|
||||||
|
|
||||||
|
## v1.1.0
|
||||||
|
### added:
|
||||||
|
- option to choose your own prefix
|
||||||
|
- enable/disable transcripts
|
||||||
|
- enable/disable categories
|
||||||
|
### fixed:
|
||||||
|
- the bot crashed sometimes
|
||||||
|
### removed:
|
||||||
|
- credits
|
||||||
|
|
||||||
|
## v1.0.0
|
||||||
|
- initial release
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
# config file
|
||||||
|
[](https://discord.com/invite/26vT9wt3n3)
|
||||||
|
[](https://github.com/DJj123dj/open-ticket/releases/tag/v1.3.0)
|
||||||
|
[](#packages)
|
||||||
|
[](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE)
|
||||||
|
|
||||||
|
In this file you find all the information about commands in the config.json file
|
||||||
|
|
||||||
|
- server_name ➜ the name of your server (optional) _**type: string**_
|
||||||
|
- server_logo ➜ the logo of your server (optional) _**type: url**_
|
||||||
|
- bot_name ➜ the name from the bot _**type: string**_
|
||||||
|
- main_color ➜ the color used in embeds _**type: hex color (#000000)**_
|
||||||
|
- auth_token ➜ your bot's token _**type: string**_
|
||||||
|
- botperms_role ➜ this role can do all admin commands from the bot _**type: discord role id**_
|
||||||
|
- prefix ➜ the prefix _**type: string**_
|
||||||
|
- credits ➜ disable the credits _**type: boolean**_
|
||||||
|
|
||||||
|
## status: (the status from the bot)
|
||||||
|
- type ➜ set the status type _**type: string (PLAYING | LISTENING | WATCHING | CUSTOM)**
|
||||||
|
- text ➜ set the status text _**type: string**_
|
||||||
|
|
||||||
|
## system: (the configuration for the ticket system)
|
||||||
|
- ticket_channel ➜ channel where you are going to set `!ticket msg` _**type: discord channel id**_
|
||||||
|
- max_allowed_tickets ➜ the maximum allowed tickets per person _**type: number**_
|
||||||
|
- enable_DM_Messages ➜ enable DM messages _**type: boolean**_
|
||||||
|
- enable_category ➜ enable category _**type: boolean**_
|
||||||
|
- ticket_category ➜ the category id _**type: discord category id**_
|
||||||
|
- has@everyoneaccess ➜ when enabled everyone has acces to the tickets _**type: boolean**_
|
||||||
|
- member_role ➜ this role doesn't have access to tickets _**type: discord role id**_
|
||||||
|
- enable_transcript ➜ enable the transcript _**type: boolean**_
|
||||||
|
- transcript_channel ➜ the transcript channel id _**type: discord channel id**_
|
||||||
|
|
||||||
|
## messages: (general, dm, ticket)
|
||||||
|
- nopermissions ➜ the message when someone doesn't have permissions _**type: string**_
|
||||||
|
- alreadyCreated ➜ if you have too much tickets open _**type: string**_
|
||||||
|
- newTicket ➜ when you create a new ticket _**type: string**_
|
||||||
|
- closeTicket ➜ when you close a ticket _**type: string**_
|
||||||
|
- newTicketEmbed ➜ the first message in the ticket channel _**type: string**
|
||||||
|
|
||||||
|
## layout: (ticketEmbed, ticketMsg, transcript)
|
||||||
|
`transcript` doesn't have all the options
|
||||||
|
|
||||||
|
- customColorEnabled ➜ custom embed color enabled _**type: boolean**
|
||||||
|
- customColor ➜ the custom color _**type: hex color (#000000)**
|
||||||
|
- footerEnabled ➜ custom footer enabled _**type: boolean**
|
||||||
|
- footer ➜ the custom footer _**type: string**
|
||||||
|
- thumbnailEnabled ➜ custom thumbnail enabled _**type: boolean**
|
||||||
|
- thumbnailURL ➜ the image _**type: string**
|
||||||
|
|
||||||
|
## options: (per ticket)
|
||||||
|
color is not needed when `isURL` is `true`
|
||||||
|
|
||||||
|
- enabled ➜ enable this ticket _**type: boolean**
|
||||||
|
- icon ➜ the button emoji _**type: emoji or custom emoji**
|
||||||
|
- description ➜ ticket description _**type: string**
|
||||||
|
- name ➜ ticket name _**type: string**
|
||||||
|
- channel_prefix ➜ ticket prefix _**type: string**
|
||||||
|
- color ➜ button color _**type: string (red|green|blue|gray|none)**
|
||||||
|
- isURL ➜ create link to a website instead of a normal ticket _**type: boolean**
|
||||||
|
- url ➜ the website to go to _**type: string**
|
||||||
|
|
||||||
|
# thanks for using open-ticket
|
||||||
|
I didn't know that open-tickets was going to be so much used. I will be creating more updates in the future!
|
||||||
|
|
||||||
|
If you have an idea for new updates you can always say it in my discord server!
|
||||||
|
|
||||||
|
open-tickets v1.3.0
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
# open-ticket
|
# open-ticket
|
||||||
|
[](https://discord.com/invite/26vT9wt3n3)
|
||||||
|
[](https://github.com/DJj123dj/open-ticket/releases/tag/v1.3.0)
|
||||||
|
[](#packages)
|
||||||
|
[](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE)
|
||||||
|
|
||||||
This is an open-source discord ticket bot, you can configure it and it comes with cool features like transcripts & custom options!
|
This is an open-source discord ticket bot, you can configure it and it comes with cool features like transcripts & custom options!
|
||||||
|
|
||||||
<img src="logo.png" alt="Open Ticket logo" style="height: 300px; width:300px;"/>
|
<img src="logo.png" alt="Open Ticket logo" style="height: 300px; width:300px;"/>
|
||||||
@@ -8,78 +13,48 @@ This is an open-source discord ticket bot, you can configure it and it comes wit
|
|||||||
- transcripts
|
- transcripts
|
||||||
- add/remove users from ticket
|
- add/remove users from ticket
|
||||||
- custom colors & name
|
- custom colors & name
|
||||||
- has tickets for questions, partners & job applications
|
- create custom ticket names, icons & colors
|
||||||
|
- create url buttons for websites
|
||||||
- uses discord.js 13
|
- uses discord.js 13
|
||||||
- configure your own ticket options
|
- configure your own ticket options
|
||||||
- remove credits if you want
|
- remove credits if you want
|
||||||
|
- up to 6 tickets at the same time
|
||||||
|
- change all bot messages
|
||||||
|
|
||||||
## installation
|
## installation
|
||||||
You need `node.js 16` to run this project, if you don't want to install `node.js 16` then there is a npm package that can help you.
|
**You need `node.js 16` to run this project!**
|
||||||
|
|
||||||
You can clone this project for download.
|
You can clone or download this project.
|
||||||
|
|
||||||
### packages
|
### packages
|
||||||
- canvas => version `^2.8.0`
|
- canvas => version `latest`
|
||||||
- discord.js => version `^13.2.0`
|
- discord.js => version `latest`
|
||||||
- express => version `^4.17.1`
|
- express => version `latest`
|
||||||
- node-localstorage => version `^2.2.1`
|
- node-localstorage => version `latest`
|
||||||
|
|
||||||
The packages are also in package.json!
|
You can install all of them by running `npm install`
|
||||||
|
|
||||||
### node.js 16 package
|
|
||||||
if you don't want to install `node.js 16`, you can install this package too
|
|
||||||
- node => version ^16.10.0
|
|
||||||
|
|
||||||
_npm install node@16_
|
|
||||||
|
|
||||||
## running
|
## running
|
||||||
you can run `node index.js` but i would recommend you to use `npm start`
|
you can run `node index.js` but i would recommend you to use `npm start`
|
||||||
|
|
||||||
if there are any errors, you can open an **issue on github** or **contact me in the discord server**.
|
if there are any errors, you can open an **issue on github** or **contact me in the discord server**.
|
||||||
|
|
||||||
### config (required)
|
### config
|
||||||
=> main config
|
Our config documentation is moved to another file:
|
||||||
- `server_name` => the name from your server.
|
[click here to view](CONFIG.md)
|
||||||
- `server_logo`=> the logo from your server.
|
|
||||||
- `bot_name`=> the bot's name.
|
|
||||||
- `main_color`=> the color used in all embeds.
|
|
||||||
- `auth_token`=> the bot's token (Discord Developer Portal)
|
|
||||||
- `botperms_role`=> the id from a role that can run admin commands with the bot.
|
|
||||||
- `prefix`=> the bot's prefix.
|
|
||||||
|
|
||||||
- `credits_please-do-not-remove` => remove the credits or not
|
|
||||||
|
|
||||||
=> status config
|
|
||||||
- `status/type` => PLAYING | STREAMING | LISTENING | WATCHING | CUSTOM | COMPETING
|
|
||||||
- `status/text` => the status text
|
|
||||||
|
|
||||||
=> ticket system config
|
|
||||||
- `system/ticket_channel` => the channel where you are going to put the !ticket msg.
|
|
||||||
- `system/ticket_category` => the category for tickets.
|
|
||||||
- `system/member_role` => this role doesn't have access to tickets
|
|
||||||
(WARNING: @everyone does have access to tickets, so make sure all members have a member role!).
|
|
||||||
- `system/transcript_channel` => the channel for transcripts.
|
|
||||||
- `system/enable_transcripts` => enable transcripts.
|
|
||||||
- `system/enable_category` => enable tickets in category.
|
|
||||||
|
|
||||||
=> ticket options config
|
|
||||||
- `options/ticket.../enabled` => set this option TRUE or FALSE.
|
|
||||||
- `options/ticket.../icon` => set an emoji for this ticket option.
|
|
||||||
- `options/ticket.../description` => set a description for this ticket option.
|
|
||||||
- `options/ticket.../name` => set a name for this ticket option.
|
|
||||||
- `options/ticket.../channel_prefix` => this will be the prefix for channel names (empty is disabled!)
|
|
||||||
|
|
||||||
### intents & permissions
|
### intents & permissions
|
||||||
In the discord developer portal in the "bot" panel you will find 3 switches under the title "Gateaway Intents". The following switches should always be turned on
|
In the discord developer portal in the "bot" panel you will find 3 switches under the title "Gateaway Intents". The following switches should always be turned on
|
||||||
- `SERVER MEMBERS INTENT`
|
- `SERVER MEMBERS INTENT`
|
||||||
- `MESSAGE CONTENT INTENT`
|
- `MESSAGE CONTENT INTENT`
|
||||||
|
|
||||||
The bot needs `ADMINISTRATOR` permissions to work the best.
|
To work the best, the bot needs `ADMINISTRATOR` permissions.
|
||||||
|
You can also configure your own permissions
|
||||||
|
|
||||||
## credits
|
## information
|
||||||
Please don't remove the credits from the bot 😊.
|
|
||||||
|
|
||||||
_v1.2.2_
|
_v1.3.0_
|
||||||
|
|
||||||
© 2021 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.com/invite/26vT9wt3n3)
|
changelog: [click here](CHANGELOG.md)
|
||||||
|
|
||||||
|
© 2022 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.com/invite/26vT9wt3n3)
|
||||||
+135
-27
@@ -7,52 +7,147 @@ const config = require("../config.json")
|
|||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
client.on("messageCreate", msg => {
|
client.on("messageCreate", msg => {
|
||||||
if (msg.content == config.prefix+"ticket msg"){
|
if (msg.content == config.prefix+"ticket msg"){
|
||||||
if (msg.member.roles.cache.has(config.botperms_role) == false && msg.author.id != "779742674932072469"){
|
if (msg.member.roles.cache.has(config.botperms_role) == false){
|
||||||
msg.channel.send({content:"You don't have permissons for this command!"})
|
msg.channel.send({content:config.messages.general.nopermissions})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var ticketButton = new discord.MessageActionRow()
|
var ticketButton = new discord.MessageActionRow()
|
||||||
|
|
||||||
|
const getColor = (color) => {
|
||||||
|
if (color.toLowerCase() == "red"){
|
||||||
|
return "DANGER"
|
||||||
|
}else if (color.toLowerCase() == "green"){
|
||||||
|
return "SUCCESS"
|
||||||
|
}else if (color.toLowerCase() == "blue" || color.toLowerCase() == "blurple"){
|
||||||
|
return "PRIMARY"
|
||||||
|
}else if (color.toLowerCase() == "black" || color.toLowerCase() == "gray" || color.toLowerCase() == "grey"){
|
||||||
|
return "SECONDARY"
|
||||||
|
}else if (color == "DANGER" || color == "SECONDARY" || color == "SUCCESS" || color == "PRIMARY"){
|
||||||
|
return color
|
||||||
|
}else if (color.toLowerCase() == "none" || color.toLowerCase() == "false" || color.toLowerCase() == ""){
|
||||||
|
return "SECONDARY"
|
||||||
|
}else return "SECONDARY"
|
||||||
|
}
|
||||||
|
|
||||||
if (config.options.ticket1.enabled){
|
if (config.options.ticket1.enabled){
|
||||||
ticketButton.addComponents(
|
if (config.options.ticket1.isURL == false){
|
||||||
new discord.MessageButton()
|
ticketButton.addComponents(
|
||||||
.setCustomId("newTicket1")
|
new discord.MessageButton()
|
||||||
.setDisabled(false)
|
.setCustomId("newTicket1")
|
||||||
.setStyle("SECONDARY")
|
.setDisabled(false)
|
||||||
.setEmoji(config.options.ticket1.icon)
|
.setStyle(getColor(config.options.ticket1.color))
|
||||||
)
|
.setEmoji(config.options.ticket1.icon)
|
||||||
|
)
|
||||||
|
}else{
|
||||||
|
ticketButton.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setDisabled(false)
|
||||||
|
.setStyle("LINK")
|
||||||
|
.setEmoji(config.options.ticket1.icon)
|
||||||
|
.setURL(config.options.ticket1.url)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.options.ticket2.enabled){
|
if (config.options.ticket2.enabled){
|
||||||
|
if (config.options.ticket2.isURL == false){
|
||||||
ticketButton.addComponents(
|
ticketButton.addComponents(
|
||||||
new discord.MessageButton()
|
new discord.MessageButton()
|
||||||
.setCustomId("newTicket2")
|
.setCustomId("newTicket2")
|
||||||
.setDisabled(false)
|
.setDisabled(false)
|
||||||
.setStyle("SECONDARY")
|
.setStyle(getColor(config.options.ticket2.color))
|
||||||
.setEmoji(config.options.ticket2.icon)
|
.setEmoji(config.options.ticket2.icon)
|
||||||
)
|
)
|
||||||
|
}else{
|
||||||
|
ticketButton.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setDisabled(false)
|
||||||
|
.setStyle("LINK")
|
||||||
|
.setEmoji(config.options.ticket2.icon)
|
||||||
|
.setURL(config.options.ticket2.url)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.options.ticket3.enabled){
|
if (config.options.ticket3.enabled){
|
||||||
ticketButton.addComponents(
|
if (config.options.ticket3.isURL == false){
|
||||||
new discord.MessageButton()
|
ticketButton.addComponents(
|
||||||
.setCustomId("newTicket3")
|
new discord.MessageButton()
|
||||||
.setDisabled(false)
|
.setCustomId("newTicket3")
|
||||||
.setStyle("SECONDARY")
|
.setDisabled(false)
|
||||||
.setEmoji(config.options.ticket3.icon)
|
.setStyle(getColor(config.options.ticket3.color))
|
||||||
)
|
.setEmoji(config.options.ticket3.icon)
|
||||||
|
)
|
||||||
|
}else{
|
||||||
|
ticketButton.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setDisabled(false)
|
||||||
|
.setStyle("LINK")
|
||||||
|
.setEmoji(config.options.ticket3.icon)
|
||||||
|
.setURL(config.options.ticket3.url)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.options.ticket4.enabled){
|
if (config.options.ticket4.enabled){
|
||||||
ticketButton.addComponents(
|
if (config.options.ticket4.isURL == false){
|
||||||
new discord.MessageButton()
|
ticketButton.addComponents(
|
||||||
.setCustomId("newTicket4")
|
new discord.MessageButton()
|
||||||
.setDisabled(false)
|
.setCustomId("newTicket4")
|
||||||
.setStyle("SECONDARY")
|
.setDisabled(false)
|
||||||
.setEmoji(config.options.ticket4.icon)
|
.setStyle(getColor(config.options.ticket4.color))
|
||||||
)
|
.setEmoji(config.options.ticket4.icon)
|
||||||
|
)
|
||||||
|
}else{
|
||||||
|
ticketButton.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setDisabled(false)
|
||||||
|
.setStyle("LINK")
|
||||||
|
.setEmoji(config.options.ticket4.icon)
|
||||||
|
.setURL(config.options.ticket4.url)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.options.ticket5.enabled){
|
||||||
|
if (config.options.ticket5.isURL == false){
|
||||||
|
ticketButton.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setCustomId("newTicket5")
|
||||||
|
.setDisabled(false)
|
||||||
|
.setStyle(getColor(config.options.ticket5.color))
|
||||||
|
.setEmoji(config.options.ticket5.icon)
|
||||||
|
)
|
||||||
|
}else{
|
||||||
|
ticketButton.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setDisabled(false)
|
||||||
|
.setStyle("LINK")
|
||||||
|
.setEmoji(config.options.ticket5.icon)
|
||||||
|
.setURL(config.options.ticket5.url)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.options.ticket6.enabled){
|
||||||
|
if (config.options.ticket6.isURL == false){
|
||||||
|
ticketButton.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setCustomId("newTicket6")
|
||||||
|
.setDisabled(false)
|
||||||
|
.setStyle(getColor(config.options.ticket6.color))
|
||||||
|
.setEmoji(config.options.ticket6.icon)
|
||||||
|
)
|
||||||
|
}else{
|
||||||
|
ticketButton.addComponents(
|
||||||
|
new discord.MessageButton()
|
||||||
|
.setDisabled(false)
|
||||||
|
.setStyle("LINK")
|
||||||
|
.setEmoji(config.options.ticket6.icon)
|
||||||
|
.setURL(config.options.ticket6.url)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var categorylist = ""
|
var categorylist = ""
|
||||||
@@ -63,13 +158,26 @@ module.exports = () => {
|
|||||||
if (config.options.ticket3.enabled){categorylist = categorylist+"\n\n"+config.options.ticket3.icon+": **"+config.options.ticket3.name+"**\n"+config.options.ticket3.description}
|
if (config.options.ticket3.enabled){categorylist = categorylist+"\n\n"+config.options.ticket3.icon+": **"+config.options.ticket3.name+"**\n"+config.options.ticket3.description}
|
||||||
|
|
||||||
if (config.options.ticket4.enabled){categorylist = categorylist+"\n\n"+config.options.ticket4.icon+": **"+config.options.ticket4.name+"**\n"+config.options.ticket4.description}
|
if (config.options.ticket4.enabled){categorylist = categorylist+"\n\n"+config.options.ticket4.icon+": **"+config.options.ticket4.name+"**\n"+config.options.ticket4.description}
|
||||||
|
|
||||||
|
if (config.options.ticket5.enabled){categorylist = categorylist+"\n\n"+config.options.ticket5.icon+": **"+config.options.ticket5.name+"**\n"+config.options.ticket5.description}
|
||||||
|
|
||||||
|
if (config.options.ticket6.enabled){categorylist = categorylist+"\n\n"+config.options.ticket6.icon+": **"+config.options.ticket6.name+"**\n"+config.options.ticket6.description}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var ticketEmbed = new discord.MessageEmbed()
|
var ticketEmbed = new discord.MessageEmbed()
|
||||||
.setColor(config.main_color)
|
if (config.layout.ticketMsg.customColorEnabled){
|
||||||
.setDescription("**Create a ticket:**\nClick one of the buttons below to create a ticket.\n\n__choose a category:__"+categorylist+"\n\n**watch out:**_You can only create 1 ticket at a time!_")
|
ticketEmbed.setColor(config.layout.ticketMsg.customColor)
|
||||||
|
}else{ticketEmbed.setColor(config.main_color)}
|
||||||
|
|
||||||
|
if (config.layout.ticketMsg.footerEnabled){
|
||||||
|
ticketEmbed.setFooter(config.layout.ticketMsg.footer)
|
||||||
|
}
|
||||||
|
if (config.layout.ticketMsg.thumbnailEnabled){
|
||||||
|
ticketEmbed.setThumbnail(config.layout.ticketMsg.thumbnailURL)
|
||||||
|
}
|
||||||
|
|
||||||
|
ticketEmbed.setDescription("**Create a ticket:**\nClick one of the buttons below to create a ticket.\n\n__choose a category:__"+categorylist+"\n\n**watch out:**_You can only create "+config.system.max_allowed_tickets+" ticket(s) at a time!_")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ module.exports = () => {
|
|||||||
const prefix = config.prefix
|
const prefix = config.prefix
|
||||||
TicketHelpMsg.setDescription("**Go to <#"+config.system.ticket_channel+"> to create a ticket!**\n\n`"+prefix+"ticket msg` ➜ _Admin command._\n`"+prefix+"ticket rename` ➜ _Rename a ticket (no spaces)._\n`"+prefix+"ticket close` ➜ _Close a ticket._\n`"+prefix+"ticket add <user>` ➜ _Add a user to the ticket._\n`"+prefix+"ticket remove <user>` ➜ _Remove a user from the ticket._\n`"+prefix+"resetdatabase` ➜ _Steps to reset the database._")
|
TicketHelpMsg.setDescription("**Go to <#"+config.system.ticket_channel+"> to create a ticket!**\n\n`"+prefix+"ticket msg` ➜ _Admin command._\n`"+prefix+"ticket rename` ➜ _Rename a ticket (no spaces)._\n`"+prefix+"ticket close` ➜ _Close a ticket._\n`"+prefix+"ticket add <user>` ➜ _Add a user to the ticket._\n`"+prefix+"ticket remove <user>` ➜ _Remove a user from the ticket._\n`"+prefix+"resetdatabase` ➜ _Steps to reset the database._")
|
||||||
|
|
||||||
if (config['credits_please-do-not-remove']){
|
if (config.credits){
|
||||||
TicketHelpMsg.setFooter("OpenTicket by DJdj Development | view on github for source code")
|
TicketHelpMsg.setFooter("Open-Ticket by DJdj Development | view on github for source code")
|
||||||
}
|
}
|
||||||
|
|
||||||
msg.channel.send({embeds:[TicketHelpMsg]})
|
msg.channel.send({embeds:[TicketHelpMsg]})
|
||||||
@@ -35,7 +35,7 @@ module.exports = () => {
|
|||||||
msg.channel.send({content:"I didn't find the close button!"})
|
msg.channel.send({content:"I didn't find the close button!"})
|
||||||
}
|
}
|
||||||
if (firstmsg.author.id != client.user.id){
|
if (firstmsg.author.id != client.user.id){
|
||||||
msg.channel.send({content:"You aren't in a ticket!"})
|
msg.channel.send({content:"You are not in a ticket!"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var CloseMsg = new discord.MessageEmbed()
|
var CloseMsg = new discord.MessageEmbed()
|
||||||
@@ -55,7 +55,7 @@ module.exports = () => {
|
|||||||
if (args[0] == config.prefix+"ticket" && args[1] == "rename"){
|
if (args[0] == config.prefix+"ticket" && args[1] == "rename"){
|
||||||
|
|
||||||
if (msg.member.roles.cache.has(config.botperms_role) == false && msg.author.id != "779742674932072469"){
|
if (msg.member.roles.cache.has(config.botperms_role) == false && msg.author.id != "779742674932072469"){
|
||||||
msg.channel.send({content:"You don't have permissions for this command!"})
|
msg.channel.send({content:config.messages.general.nopermissions})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ module.exports = () => {
|
|||||||
rmsg.channel.setName(name)
|
rmsg.channel.setName(name)
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
msg.channel.send({content:"You aren't in a ticket!"})
|
msg.channel.send({content:"You are not in a ticket!"})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -82,13 +82,13 @@ module.exports = () => {
|
|||||||
if (args[0] == config.prefix+"ticket" && args[1] == "add"){
|
if (args[0] == config.prefix+"ticket" && args[1] == "add"){
|
||||||
|
|
||||||
if (msg.member.roles.cache.has(config.botperms_role) == false && msg.author.id != "779742674932072469"){
|
if (msg.member.roles.cache.has(config.botperms_role) == false && msg.author.id != "779742674932072469"){
|
||||||
msg.channel.send({content:"You don't have permissions for this command!"})
|
msg.channel.send({content:config.messages.general.nopermissions})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
msg.channel.messages.fetch().then(msglist => {
|
msg.channel.messages.fetch().then(msglist => {
|
||||||
if (msglist.last().author.id != client.user.id){
|
if (msglist.last().author.id != client.user.id){
|
||||||
msg.channel.send({content:"You aren't in a ticket!"})
|
msg.channel.send({content:"You are not in a ticket!"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ module.exports = () => {
|
|||||||
if (args[0] == config.prefix+"ticket" && args[1] == "remove"){
|
if (args[0] == config.prefix+"ticket" && args[1] == "remove"){
|
||||||
|
|
||||||
if (msg.member.roles.cache.has(config.botperms_role) == false && msg.author.id != "779742674932072469"){
|
if (msg.member.roles.cache.has(config.botperms_role) == false && msg.author.id != "779742674932072469"){
|
||||||
msg.channel.send({content:"You don't have permissions for this command!"})
|
msg.channel.send({content:config.messages.general.nopermissions})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+96
-44
@@ -18,30 +18,33 @@ module.exports = () => {
|
|||||||
.setLabel("Close Ticket")
|
.setLabel("Close Ticket")
|
||||||
.setEmoji("❌")
|
.setEmoji("❌")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//ticket button click / create ticket
|
||||||
client.on("interactionCreate",interaction => {
|
client.on("interactionCreate",interaction => {
|
||||||
|
|
||||||
if (interaction.isButton() == false){
|
if (interaction.isButton() == false){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interaction.customId == "newTicket1"||interaction.customId == "newTicket2"||interaction.customId == "newTicket3"||interaction.customId == "newTicket4"){
|
if (interaction.customId == "newTicket1"||interaction.customId == "newTicket2"||interaction.customId == "newTicket3"||interaction.customId == "newTicket4"||interaction.customId == "newTicket5"||interaction.customId == "newTicket6"){
|
||||||
|
|
||||||
interaction.deferUpdate()
|
interaction.deferUpdate()
|
||||||
|
|
||||||
if (ticketStorage.getItem(interaction.member.id) == null ||ticketStorage.getItem(interaction.member.id) == "false"){
|
if (ticketStorage.getItem(interaction.member.id) == null ||ticketStorage.getItem(interaction.member.id) == "false"|| Number(ticketStorage.getItem(interaction.member.id)) < config.system.max_allowed_tickets){
|
||||||
|
|
||||||
try{
|
try{
|
||||||
interaction.member.send("**You created a ticket in our server!**")
|
if (config.system.enable_DM_Messages){
|
||||||
|
interaction.member.send(config.messages.dm.newTicket)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch{console.log("can't send DM to member || member doesn't allow dm's")}
|
catch{console.log("can't send DM to member || member doesn't allow dm's")}
|
||||||
|
|
||||||
|
|
||||||
|
//update storage
|
||||||
ticketStorage.setItem(interaction.member.id,"true")
|
ticketStorage.setItem(interaction.member.id,Number(ticketStorage.getItem(interaction.member.id))+1)
|
||||||
|
|
||||||
var ticketNumber = interaction.member.user.username
|
var ticketNumber = interaction.member.user.username
|
||||||
|
|
||||||
|
//set ticketName
|
||||||
if (interaction.customId == "newTicket1"){
|
if (interaction.customId == "newTicket1"){
|
||||||
var ticketName = config.options.ticket1.channel_prefix+ticketNumber
|
var ticketName = config.options.ticket1.channel_prefix+ticketNumber
|
||||||
}else if (interaction.customId == "newTicket2"){
|
}else if (interaction.customId == "newTicket2"){
|
||||||
@@ -50,51 +53,83 @@ module.exports = () => {
|
|||||||
var ticketName = config.options.ticket3.channel_prefix+ticketNumber
|
var ticketName = config.options.ticket3.channel_prefix+ticketNumber
|
||||||
}else if (interaction.customId == "newTicket4"){
|
}else if (interaction.customId == "newTicket4"){
|
||||||
var ticketName = config.options.ticket4.channel_prefix+ticketNumber
|
var ticketName = config.options.ticket4.channel_prefix+ticketNumber
|
||||||
|
}else if (interaction.customId == "newTicket5"){
|
||||||
|
var ticketName = config.options.ticket5.channel_prefix+ticketNumber
|
||||||
|
}else if (interaction.customId == "newTicket6"){
|
||||||
|
var ticketName = config.options.ticket6.channel_prefix+ticketNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//set category
|
||||||
if (config.system.enable_category){
|
if (config.system.enable_category){
|
||||||
var Category = config.system.ticket_category
|
var Category = config.system.ticket_category
|
||||||
}else{var Category = null}
|
}else{var Category = null}
|
||||||
|
|
||||||
interaction.guild.channels.create(ticketName,{
|
//set everyone allowed
|
||||||
type:"GUILD_TEXT",
|
if (config.system['has@everyoneaccess']){
|
||||||
parent:Category,
|
var everyoneAllowPerms = ["ADD_REACTIONS","ATTACH_FILES","EMBED_LINKS","SEND_MESSAGES","VIEW_CHANNEL"]
|
||||||
permissionOverwrites:[
|
var everyoneDenyPerms = []
|
||||||
{
|
}else{
|
||||||
id:interaction.member.id,
|
var everyoneAllowPerms = []
|
||||||
type:"member",
|
var everyoneDenyPerms = ["VIEW_CHANNEL"]
|
||||||
allow:["ADD_REACTIONS","ATTACH_FILES","EMBED_LINKS","SEND_MESSAGES","VIEW_CHANNEL"]
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
id:config.botperms_role,
|
|
||||||
type:"role",
|
|
||||||
allow:["ADD_REACTIONS","ATTACH_FILES","EMBED_LINKS","SEND_MESSAGES","VIEW_CHANNEL"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id:config.system.member_role,
|
|
||||||
type:"role",
|
|
||||||
deny:["VIEW_CHANNEL"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}).then(tChannel => {
|
|
||||||
userTicketStorage.setItem(tChannel.id,interaction.member.id)
|
|
||||||
|
|
||||||
|
|
||||||
var ticketEmbed = new discord.MessageEmbed()
|
|
||||||
.setColor(config.main_color)
|
|
||||||
|
|
||||||
ticketEmbed.setDescription("You created a ticket!\n\n_Click on the close button below to close this ticket_")
|
//create the channel
|
||||||
|
interaction.guild.channels.create(ticketName,{
|
||||||
|
type:"GUILD_TEXT",
|
||||||
|
parent:Category,
|
||||||
|
permissionOverwrites:[
|
||||||
|
{
|
||||||
|
id:interaction.member.id,
|
||||||
|
type:"member",
|
||||||
|
allow:["ADD_REACTIONS","ATTACH_FILES","EMBED_LINKS","SEND_MESSAGES","VIEW_CHANNEL"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:config.botperms_role,
|
||||||
|
type:"role",
|
||||||
|
allow:["ADD_REACTIONS","ATTACH_FILES","EMBED_LINKS","SEND_MESSAGES","VIEW_CHANNEL"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:config.system.member_role,
|
||||||
|
type:"role",
|
||||||
|
deny:["VIEW_CHANNEL"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id:interaction.guild.id,
|
||||||
|
type:"role",
|
||||||
|
allow:everyoneAllowPerms,
|
||||||
|
deny:everyoneDenyPerms
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}).then(tChannel => {
|
||||||
|
userTicketStorage.setItem(tChannel.id,interaction.member.id)
|
||||||
|
|
||||||
tChannel.send({content:"<@"+interaction.member.id+"> <@&"+config.botperms_role+">",embeds:[ticketEmbed],components:[closeButton]}).then(firstmsg => {
|
|
||||||
firstmsg.pin()
|
var ticketEmbed = new discord.MessageEmbed()
|
||||||
})
|
if (config.layout.ticketEmbed.customColorEnabled){
|
||||||
|
ticketEmbed.setColor(config.layout.ticketEmbed.customColor)
|
||||||
|
}else{ticketEmbed.setColor(config.main_color)}
|
||||||
|
|
||||||
|
if (config.layout.ticketEmbed.footerEnabled){
|
||||||
|
ticketEmbed.setFooter(config.layout.ticketEmbed.footer)
|
||||||
|
}
|
||||||
|
if (config.layout.ticketEmbed.thumbnailEnabled){
|
||||||
|
ticketEmbed.setThumbnail(config.layout.ticketEmbed.thumbnailURL)
|
||||||
|
}
|
||||||
|
ticketEmbed.setTitle("You created a ticket!")
|
||||||
|
ticketEmbed.setDescription(config.messages.ticket.newTicketEmbed)
|
||||||
|
|
||||||
|
tChannel.send({content:"<@"+interaction.member.id+"> <@&"+config.botperms_role+">",embeds:[ticketEmbed],components:[closeButton]}).then(firstmsg => {
|
||||||
|
firstmsg.pin()
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
try {
|
try {
|
||||||
interaction.member.send("**You have already created a ticket!**")
|
if (config.system.enable_DM_Messages){
|
||||||
|
interaction.member.send(config.messages.dm.alreadyCreated)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch{console.log("can't send DM to member || member doesn't allow dm's")}
|
catch{console.log("can't send DM to member || member doesn't allow dm's")}
|
||||||
|
|
||||||
@@ -106,6 +141,7 @@ module.exports = () => {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//closeBAR
|
||||||
var closeBar = new discord.MessageActionRow()
|
var closeBar = new discord.MessageActionRow()
|
||||||
.addComponents(
|
.addComponents(
|
||||||
new discord.MessageButton()
|
new discord.MessageButton()
|
||||||
@@ -173,6 +209,15 @@ module.exports = () => {
|
|||||||
var transcript = transcriptArray.reverse().join("\n")
|
var transcript = transcriptArray.reverse().join("\n")
|
||||||
transcriptStorage.setItem(interaction.channel.id,transcript)
|
transcriptStorage.setItem(interaction.channel.id,transcript)
|
||||||
|
|
||||||
|
//transcript color & thumbnail
|
||||||
|
if (config.layout.transcripts.customColorEnabled){
|
||||||
|
var transcriptColor = config.layout.transcripts.customColor
|
||||||
|
}else{var transcriptColor = config.main_color}
|
||||||
|
|
||||||
|
if (config.layout.transcripts.thumbnailEnabled){
|
||||||
|
var transcriptThumbnail = config.layout.transcripts.thumbnailURL
|
||||||
|
}else{var transcriptThumbnail = ""}
|
||||||
|
|
||||||
var splittedTranscript = [transcript.slice(0,2000)]
|
var splittedTranscript = [transcript.slice(0,2000)]
|
||||||
if (transcript.length > 4000){
|
if (transcript.length > 4000){
|
||||||
splittedTranscript.push(transcript.slice(2000,4000))
|
splittedTranscript.push(transcript.slice(2000,4000))
|
||||||
@@ -181,35 +226,40 @@ module.exports = () => {
|
|||||||
splittedTranscript.push(transcript.slice(2000))
|
splittedTranscript.push(transcript.slice(2000))
|
||||||
}
|
}
|
||||||
var transcriptEmbed = new discord.MessageEmbed()
|
var transcriptEmbed = new discord.MessageEmbed()
|
||||||
.setColor(config.main_color)
|
.setColor(transcriptColor)
|
||||||
.setAuthor(interaction.channel.name + " - ticket created by "+getuserNAME)
|
.setAuthor(interaction.channel.name + " - ticket created by "+getuserNAME)
|
||||||
.setTitle("There is a new transcript!")
|
.setTitle("There is a new transcript!")
|
||||||
.setDescription(splittedTranscript[0])
|
.setDescription(splittedTranscript[0])
|
||||||
.setFooter("ticket closed by "+interaction.member.user.username)
|
.setFooter("ticket closed by "+interaction.member.user.username)
|
||||||
|
.setThumbnail(transcriptThumbnail)
|
||||||
|
|
||||||
if (transcript.length > 4000){
|
if (transcript.length > 4000){
|
||||||
var transcriptEmbed2 = new discord.MessageEmbed()
|
var transcriptEmbed2 = new discord.MessageEmbed()
|
||||||
.setColor(config.main_color)
|
.setColor(transcriptColor)
|
||||||
.setAuthor(interaction.channel.name + " - ticket created by "+getuserNAME)
|
.setAuthor(interaction.channel.name + " - ticket created by "+getuserNAME)
|
||||||
.setTitle("transcript #2")
|
.setTitle("transcript #2")
|
||||||
.setDescription(splittedTranscript[1])
|
.setDescription(splittedTranscript[1])
|
||||||
.setFooter("ticket closed by "+interaction.member.user.username)
|
.setFooter("ticket closed by "+interaction.member.user.username)
|
||||||
|
.setThumbnail(transcriptThumbnail)
|
||||||
|
|
||||||
var transcriptEmbed3 = new discord.MessageEmbed()
|
var transcriptEmbed3 = new discord.MessageEmbed()
|
||||||
.setColor(config.main_color)
|
.setColor(transcriptColor)
|
||||||
.setAuthor(interaction.channel.name + " - ticket created by "+getuserNAME)
|
.setAuthor(interaction.channel.name + " - ticket created by "+getuserNAME)
|
||||||
.setTitle("transcript #3")
|
.setTitle("transcript #3")
|
||||||
.setDescription(splittedTranscript[1])
|
.setDescription(splittedTranscript[1])
|
||||||
.setFooter("ticket closed by "+interaction.member.user.username)
|
.setFooter("ticket closed by "+interaction.member.user.username)
|
||||||
|
.setThumbnail(transcriptThumbnail)
|
||||||
|
|
||||||
client.channels.cache.find(ch => ch.id == config.system.transcript_channel).send({embeds:[transcriptEmbed,transcriptEmbed2,transcriptEmbed3]})
|
client.channels.cache.find(ch => ch.id == config.system.transcript_channel).send({embeds:[transcriptEmbed,transcriptEmbed2,transcriptEmbed3]})
|
||||||
|
|
||||||
}else if (transcript.length > 2000){
|
}else if (transcript.length > 2000){
|
||||||
var transcriptEmbed2 = new discord.MessageEmbed()
|
var transcriptEmbed2 = new discord.MessageEmbed()
|
||||||
.setColor(config.main_color)
|
.setColor(transcriptColor)
|
||||||
.setAuthor(interaction.channel.name + " - ticket created by "+getuserNAME)
|
.setAuthor(interaction.channel.name + " - ticket created by "+getuserNAME)
|
||||||
.setTitle("transcript #2")
|
.setTitle("transcript #2")
|
||||||
.setDescription(splittedTranscript[1])
|
.setDescription(splittedTranscript[1])
|
||||||
.setFooter("ticket closed by "+interaction.member.user.username)
|
.setFooter("ticket closed by "+interaction.member.user.username)
|
||||||
|
.setThumbnail(transcriptThumbnail)
|
||||||
|
|
||||||
client.channels.cache.find(ch => ch.id == config.system.transcript_channel).send({embeds:[transcriptEmbed,transcriptEmbed2]})
|
client.channels.cache.find(ch => ch.id == config.system.transcript_channel).send({embeds:[transcriptEmbed,transcriptEmbed2]})
|
||||||
}else{
|
}else{
|
||||||
@@ -222,10 +272,12 @@ module.exports = () => {
|
|||||||
interaction.channel.delete()
|
interaction.channel.delete()
|
||||||
|
|
||||||
|
|
||||||
ticketStorage.setItem(getuserID,"false")
|
ticketStorage.setItem(getuserID,Number(ticketStorage.getItem(getuserID)) - 1)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
interaction.member.send("**your ticket is closed by "+interaction.member.user.username+"!**")
|
if (config.system.enable_DM_Messages){
|
||||||
|
interaction.member.send(config.messages.dm.closeTicket)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch{console.log("can't send DM to member || member doesn't allow dm's")}
|
catch{console.log("can't send DM to member || member doesn't allow dm's")}
|
||||||
})
|
})
|
||||||
|
|||||||
+82
-9
@@ -1,14 +1,13 @@
|
|||||||
{
|
{
|
||||||
"server_name":"Ticket Bot Land",
|
"server_name":"Ticket Bot",
|
||||||
"server_logo":"https://www.example.com/another-example/yourlogo.png",
|
"server_logo":"https://www.example.com/another-example/yourlogo.png",
|
||||||
"bot_name":"Wumpus",
|
"bot_name":"Wumpus",
|
||||||
"main_color":"#fffff",
|
"main_color":"#fffff",
|
||||||
"auth_token":"the bot's auth token",
|
"auth_token":"the bot's auth token",
|
||||||
"botperms_role":"the id from a role that can do anything with the bot",
|
"botperms_role":"the id from an admin role (they can do admin things with the bot)",
|
||||||
"prefix":"!",
|
"prefix":"!",
|
||||||
|
|
||||||
"credits_please-do-not-remove":true,
|
"credits":true,
|
||||||
|
|
||||||
"status":{
|
"status":{
|
||||||
"type":"PLAYING | STREAMING | LISTENING | WATCHING | CUSTOM | COMPETING",
|
"type":"PLAYING | STREAMING | LISTENING | WATCHING | CUSTOM | COMPETING",
|
||||||
"text":"!ticket"
|
"text":"!ticket"
|
||||||
@@ -16,44 +15,118 @@
|
|||||||
|
|
||||||
"system":{
|
"system":{
|
||||||
"ticket_channel":"id of the channel with the !ticket msg",
|
"ticket_channel":"id of the channel with the !ticket msg",
|
||||||
|
"max_allowed_tickets":5,
|
||||||
|
"enable_DM_Messages":true,
|
||||||
|
|
||||||
"enable_category":false,
|
"enable_category":false,
|
||||||
"ticket_category":"the id of a category for the tickets",
|
"ticket_category":"the id of a category for the tickets",
|
||||||
|
|
||||||
"member_role":"this role doesn't have access to tickets (WARNING: @everyone does have access to tickets, so make sure all members have a member role!)",
|
"has@everyoneaccess":false,
|
||||||
|
"member_role":"this role doesn't have access to tickets",
|
||||||
|
|
||||||
"enable_transcript":false,
|
"enable_transcript":false,
|
||||||
"transcript_channel":"the channel for transcripts"
|
"transcript_channel":"the channel for transcripts"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"messages":{
|
||||||
|
"general":{
|
||||||
|
"nopermissions":"**You don't have permissions to run this command!**"
|
||||||
|
},
|
||||||
|
"dm":{
|
||||||
|
"alreadyCreated":"**You currently have as many open tickets as the maximum allowed!**",
|
||||||
|
"newTicket":"You created a new ticket in our server, the staff will come and help you soon!",
|
||||||
|
"closeTicket":"**Your ticket is closed!**"
|
||||||
|
},
|
||||||
|
"ticket":{
|
||||||
|
"newTicketEmbed":"You created a ticket!\n\n_Click on the close button below to close this ticket_"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"layout":{
|
||||||
|
"transcripts":{
|
||||||
|
"customColorEnabled":false,
|
||||||
|
"customColor":"#ffffff",
|
||||||
|
"thumbnailEnabled":false,
|
||||||
|
"thumbnailURL":"https://www.example.com/path/to/image.png"
|
||||||
|
},
|
||||||
|
"ticketMsg":{
|
||||||
|
"customColorEnabled":false,
|
||||||
|
"customColor":"#ffffff",
|
||||||
|
"footerEnabled":false,
|
||||||
|
"footer":"We are using open-tickets from DJj123dj",
|
||||||
|
"thumbnailEnabled":false,
|
||||||
|
"thumbnailURL":"https://www.example.com/path/to/image.png"
|
||||||
|
},
|
||||||
|
"ticketEmbed":{
|
||||||
|
"customColorEnabled":false,
|
||||||
|
"customColor":"#ffffff",
|
||||||
|
"footerEnabled":false,
|
||||||
|
"footer":"This is embed in the start of a ticket.",
|
||||||
|
"thumbnailEnabled":false,
|
||||||
|
"thumbnailURL":"https://www.example.com/path/to/image.png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"options":{
|
"options":{
|
||||||
"ticket1":{
|
"ticket1":{
|
||||||
"enabled":true,
|
"enabled":true,
|
||||||
"icon":"🎫",
|
"icon":"🎫",
|
||||||
"description":"Create a general ticket.",
|
"description":"Create a general ticket.",
|
||||||
"name":"Ticket",
|
"name":"Ticket",
|
||||||
"channel_prefix":"ticket-"
|
"channel_prefix":"ticket-",
|
||||||
|
"color":"red | green | blue | gray | none",
|
||||||
|
"isURL":false,
|
||||||
|
"url":"https://www.example.com/a/random/path/to/a/website"
|
||||||
},
|
},
|
||||||
"ticket2":{
|
"ticket2":{
|
||||||
"enabled":false,
|
"enabled":false,
|
||||||
"icon":"💼",
|
"icon":"💼",
|
||||||
"description":"Do you want to apply? Then click here!",
|
"description":"Do you want to apply? Then click here!",
|
||||||
"name":"Apply",
|
"name":"Apply",
|
||||||
"channel_prefix":"apply-"
|
"channel_prefix":"apply-",
|
||||||
|
"color":"red | green | blue | gray | none",
|
||||||
|
"isURL":false,
|
||||||
|
"url":"https://www.example.com/a/random/path/to/a/website"
|
||||||
},
|
},
|
||||||
"ticket3":{
|
"ticket3":{
|
||||||
"enabled":false,
|
"enabled":false,
|
||||||
"icon":"❓",
|
"icon":"❓",
|
||||||
"description":"Click here if you have a question about the server.",
|
"description":"Click here if you have a question about the server.",
|
||||||
"name":"Question",
|
"name":"Question",
|
||||||
"channel_prefix":"question-"
|
"channel_prefix":"question-",
|
||||||
|
"color":"red | green | blue | gray | none",
|
||||||
|
"isURL":false,
|
||||||
|
"url":"https://www.example.com/a/random/path/to/a/website"
|
||||||
},
|
},
|
||||||
"ticket4":{
|
"ticket4":{
|
||||||
"enabled":false,
|
"enabled":false,
|
||||||
"icon":"🛒",
|
"icon":"🛒",
|
||||||
"description":"Buy something in our shop.",
|
"description":"Buy something in our shop.",
|
||||||
"name":"Shop",
|
"name":"Shop",
|
||||||
"channel_prefix":"shop-"
|
"channel_prefix":"shop-",
|
||||||
|
"color":"red | green | blue | gray | none",
|
||||||
|
"isURL":false,
|
||||||
|
"url":"https://www.example.com/a/random/path/to/a/website"
|
||||||
|
},
|
||||||
|
"ticket5":{
|
||||||
|
"enabled":false,
|
||||||
|
"icon":"😄",
|
||||||
|
"description":"hello",
|
||||||
|
"name":"AnotherTicket",
|
||||||
|
"channel_prefix":"prefix-",
|
||||||
|
"color":"red | green | blue | gray | none",
|
||||||
|
"isURL":false,
|
||||||
|
"url":"https://www.example.com/a/random/path/to/a/website"
|
||||||
|
},
|
||||||
|
"ticket6":{
|
||||||
|
"enabled":false,
|
||||||
|
"icon":"😄",
|
||||||
|
"description":"hello",
|
||||||
|
"name":"AnotherTicket",
|
||||||
|
"channel_prefix":"prefix-",
|
||||||
|
"color":"red | green | blue | gray | none",
|
||||||
|
"isURL":false,
|
||||||
|
"url":"https://www.example.com/a/random/path/to/a/website"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"canvas": "^2.8.0",
|
"canvas": "^2.8.0",
|
||||||
"discord.js": "^13.2.0",
|
"discord.js": "^13.6.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"node": "^16.10.0",
|
"node": "^16.10.0",
|
||||||
"node-localstorage": "^2.2.1"
|
"node-localstorage": "^2.2.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user