3.0 update!

This commit is contained in:
DJj123dj
2022-10-07 16:32:29 +02:00
parent bfc02611c7
commit 95bc1f4fbf
19 changed files with 217 additions and 168 deletions
+18 -48
View File
@@ -1,15 +1,10 @@
## We need translators!
If you know a language that isn't already in open ticket and you can write json,
then is this the job for you!
# Open Ticket
[![discord](https://img.shields.io/badge/discord-join%20our%20server-5865F2.svg?style=flat-square&logo=discord)](https://discord.com/invite/26vT9wt3n3) [![version](https://img.shields.io/badge/version-3.0.0-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.0.0) [![discord.js](https://img.shields.io/badge/discord.js-v14-CB3837.svg?style=flat-square&logo=npm)]() [![license](https://img.shields.io/badge/license-GPL%203.0-important.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [![documentation](https://img.shields.io/badge/documentation-Click%20Here-yellow.svg?style=flat-square)](https://docs.openticket.dj-dj.be)
make a ticket in our server to start!
Open ticket is the most configurable open-source ticket bot for discord! Made with the newest technologies. Like: Slash commands, transcripts, multiple ticket types, buttons & dropdowns!
Start using it now, you can do anything!
*if you translate, you will come in the credits*
# open-ticket
[![discord](https://img.shields.io/badge/discord-join%20our%20server-5865F2.svg?style=flat-square&logo=discord)](https://discord.com/invite/26vT9wt3n3) [![version](https://img.shields.io/badge/version-3.0.0-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.0.0) [![npm](https://img.shields.io/badge/npm-external%20libraries%20needed-CB3837.svg?style=flat-square&logo=npm)](#packages) [![license](https://img.shields.io/badge/license-GPL%203.0-important.svg?style=flat-square)](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!
*We love to hear suggestions for more features!*
<img src="logo.png" alt="Open Ticket logo" style="height: 200px; width:200px;"/>
@@ -22,7 +17,7 @@ This is an open-source discord ticket bot, you can configure it and it comes wit
#### And our translators!
- ExothDE
- 1x1
- R0JO
- Redactado
- t0miiis
- josuens14
- M4
@@ -33,17 +28,15 @@ This is an open-source discord ticket bot, you can configure it and it comes wit
- discord interaction buttons
- slash & text commands
- close, delete & re-open tickets
- translation in 8 different languages
- dynamic database system
- translation in 10 different languages
- transcripts
- add/remove users from a ticket
- custom colors & name for embeds
- customise your ticket
- create url buttons for websites
- create reaction roles
- build with discord.js v14
- configure everything per ticket
- remove credits if you want :(
- a lot of customisation options.
- tickets, reaction roles & links are all possible!
- choose between buttons or dropdowns!
- discord.js v14
- everyting is configurable
- custom API + plugins
- unlimited tickets spread over multiple messages
- close with reason
@@ -51,39 +44,16 @@ This is an open-source discord ticket bot, you can configure it and it comes wit
- share transcripts
- view transcripts in html
## installation
**You need `node.js 16` to run this project!**
## quick start
[Click here to start your adventure!](https://docs.openticket.dj-dj.be/quick-start)
### packages
- chalk => version `latest`
- discord.js => version `latest`
- express => version `latest`
- node-localstorage => version `latest`
- axios => version `latest`
You can install all of them by running `npm install`
## running
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 our discord server**.
### config
Our config documentation is moved to another file:
[click here to view](https://www.github.com/DJj123dj/open-ticket/wiki/config-v3.0.0)
### 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
- `SERVER MEMBERS INTENT`
- `MESSAGE CONTENT INTENT`
To work the best, the bot needs `ADMINISTRATOR` permissions.
You can also configure your own permissions
## documentation
[Official Documentation](https://docs.openticket.dj-dj.be)
## information
_v3.0.0_
changelog: [click here](https://www.github.com/DJj123dj/open-ticket/wiki/Changelog)
changelog: [click here](https://docs.openticket.dj-dj.be/other/changelog)
© 2022 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.dj-dj.be) | [terms of service](https://www.dj-dj.be/terms)
@@ -21,7 +21,7 @@ exports.closeVerifyBar = new arb()
.setDisabled(false)
.setStyle(bs.Primary)
.setEmoji("💬")
.setLabel("close with reason")
.setLabel(l.buttons.closeWithReason)
)
.addComponents(
new button()
@@ -22,14 +22,14 @@ const tib = discord.TextInputBuilder
module.exports = () => {
//theModal
const reasonModal = new modal()
.setTitle("close with reason")
.setTitle(l.buttons.closeWithReason)
.setCustomId("OTCloseReasonModal")
const reasonInput = new arb()
.addComponents([
new tib()
.setCustomId('OTreasonInput')
.setLabel("What is the reason for closing this ticket?")
.setLabel(l.messages.modalreason)
.setStyle(tis.Short)
.setMaxLength(100)
.setRequired(true)
+13 -1
View File
@@ -40,10 +40,14 @@ module.exports = async () => {
}
},100)
//slashtranslation
const ST = require("../../language/slashcmds/slash.json").data
//create a ticket (/new or /ticket)
client.application.commands.create({
name:"ticket",
description:"Create a ticket!",
descriptionLocalizations:ST.newticket,
defaultPermission:true,
type:act.ChatInput,
options:[
@@ -53,7 +57,6 @@ module.exports = async () => {
description:"The type of ticket.",
required:true,
choices:choices
}
]
},sid).then(() => {
@@ -65,6 +68,7 @@ module.exports = async () => {
description:"Create a ticket!",
defaultPermission:true,
type:act.ChatInput,
descriptionLocalizations:ST.newticket,
options:[
{
type:acot.String,
@@ -84,6 +88,7 @@ module.exports = async () => {
name:"help",
description:"View the available commands.",
defaultPermission:true,
descriptionLocalizations:ST.help,
type:act.ChatInput
},sid).then(() => {
readystats++
@@ -95,6 +100,7 @@ module.exports = async () => {
name:"close",
description:"Close the current ticket.",
defaultPermission:true,
descriptionLocalizations:ST.close,
type:act.ChatInput,
options:[{
name:"reason",
@@ -112,6 +118,7 @@ module.exports = async () => {
name:"delete",
description:"Delete the current ticket.",
defaultPermission:true,
descriptionLocalizations:ST.delete,
type:act.ChatInput
},sid).then(() => {
readystats++
@@ -122,6 +129,7 @@ module.exports = async () => {
name:"message",
description:"Create a ticket message.",
defaultPermission:true,
descriptionLocalizations:ST.message,
type:act.ChatInput,
options:[
{
@@ -143,6 +151,7 @@ module.exports = async () => {
name:"add",
description:"Add people to this ticket.",
defaultPermission:true,
descriptionLocalizations:ST.add,
type:act.ChatInput,
options:[
{
@@ -161,6 +170,7 @@ module.exports = async () => {
name:"remove",
description:"Remove people from this ticket.",
defaultPermission:true,
descriptionLocalizations:ST.remove,
type:act.ChatInput,
options:[
{
@@ -179,6 +189,7 @@ module.exports = async () => {
name:"rename",
description:"Rename this ticket.",
defaultPermission:true,
descriptionLocalizations:ST.rename,
type:act.ChatInput,
options:[
{
@@ -197,6 +208,7 @@ module.exports = async () => {
name:"reopen",
description:"Reopen this ticket.",
defaultPermission:true,
descriptionLocalizations:ST.reopen,
type:act.ChatInput
},sid).then(() => {
readystats++
+1 -1
View File
@@ -296,7 +296,7 @@ exports.NEWcloseTicket = async (member,channel,prefix,mode,reason,nomessage) =>
if (enableTranscript == true && mode != "deletenotranscript"){
const transcriptReason = (mode == "close") ? "**"+l.messages.reason+":** "+newReason : "**"+l.messages.reason+":** "+l.messages.none
const closedByPrefix = (mode.startsWith("delete")) ? "deleted by" : "closed by"
const closedByPrefix = (mode.startsWith("delete")) ? l.messages.deletedby : l.messages.closedby
if (config.system.enable_transcript || config.system.enable_DM_transcript){
var fileattachment = await require("../transcript").createTranscript(channelmessages,channel)
+1 -1
View File
@@ -50,7 +50,7 @@ exports.createTranscript = async (messagecollection,channel) => {
try {
const cd = new Date()
const months = ["January","February","March","April","May","June","July","August","September","October","November","December"]
const dateString = cd.getDate()+" "+months[cd.getMonth()-1]+" "+cd.getFullYear()+" - "+cd.getSeconds()+":"+cd.getMinutes()+":"+cd.getHours()
const dateString = cd.getDate()+" "+months[cd.getMonth()-1]+" "+cd.getFullYear()+" - "+cd.getHours()+":"+cd.getMinutes()+":"+cd.getSeconds()
const filearray = ["open ticket transcript:\ntranscript creation: "+dateString+"\nticket name: "+ticketuserdata.ticketname+"\nticket opener: "+ticketuserdata.ticketopener.name,"\nTRANSCRIPT START:"]
messagecollection.reverse()
+2 -2
View File
@@ -15,11 +15,11 @@ exports.getDropdown = (ids) => {
.setDisabled(false)
.setMaxValues(1)
.setMinValues(1)
.setPlaceholder("Choose a ticket")
.setPlaceholder(l.messages.chooseATicket)
.addOptions(
new discord.SelectMenuOptionBuilder()
.setDefault(true)
.setLabel("Choose a ticket")
.setLabel(l.messages.chooseATicket)
.setValue("OTChooseTicket")
)
+8 -2
View File
@@ -48,7 +48,8 @@
"close": "إغلاق التكت",
"delete": "حذف التكت",
"reopen": "إعادة فتح التكت",
"sendTranscript": "طبع التكت"
"sendTranscript": "طبع التكت",
"closeWithReason":"close with reason"
},
"messages": {
"reopenTitle": "تم إعادة فتح التكت بنجاح!",
@@ -72,6 +73,11 @@
"gettingdeleted": "يتم حذف التكت...",
"none": "لا يوجد",
"reason": "سبب"
"reason": "سبب",
"deletedby":"deleted by",
"closedby":"closed by",
"modalreason":"What is the reason for closing this ticket?",
"chooseATicket": "Choose a ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Close Ticket",
"delete":"Delete Ticket",
"reopen":"Re-Open Ticket",
"sendTranscript":"Transcript"
"sendTranscript":"Transcript",
"closeWithReason":"close with reason"
},
"messages":{
"reopenTitle":"Re-Opened this ticket!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Ticket is getting deleted...",
"none":"none",
"reason":"reason"
"reason":"reason",
"deletedby":"deleted by",
"closedby":"closed by",
"modalreason":"What is the reason for closing this ticket?",
"chooseATicket": "Choose a ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Zavři ticket",
"delete":"Smaž ticket",
"reopen":"Znovu otevři ticket",
"sendTranscript":"Odešli log ticketu"
"sendTranscript":"Odešli log ticketu",
"closeWithReason":"close with reason"
},
"messages":{
"reopenTitle":"Ticket znovu otevřen!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Ticket bude smazán",
"none":"nic",
"reason":"důvod"
"reason":"důvod",
"deletedby":"deleted by",
"closedby":"closed by",
"modalreason":"What is the reason for closing this ticket?",
"chooseATicket": "Choose a ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Sluit Ticket",
"delete":"Verwijder Ticket",
"reopen":"Heropen Ticket",
"sendTranscript":"Transcript"
"sendTranscript":"Transcript",
"closeWithReason":"sluit met reden"
},
"messages":{
"reopenTitle":"Ticket heropend!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Ticket wordt verwijderd...",
"none":"geen",
"reason":"reden"
"reason":"reden",
"deletedby":"verwijderd door",
"closedby":"gesloten door",
"modalreason":"Wat is de reden om dit ticket te sluiten?",
"chooseATicket": "Kies een ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Close Ticket",
"delete":"Delete Ticket",
"reopen":"Re-Open Ticket",
"sendTranscript":"Transcript"
"sendTranscript":"Transcript",
"closeWithReason":"close with reason"
},
"messages":{
"reopenTitle":"Re-Opened this ticket!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Ticket is getting deleted...",
"none":"none",
"reason":"reason"
"reason":"reason",
"deletedby":"deleted by",
"closedby":"closed by",
"modalreason":"What is the reason for closing this ticket?",
"chooseATicket": "Choose a ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Fermer le ticket",
"delete":"Supprimer le billet",
"reopen":"Billet de réouverture",
"sendTranscript":"Transcript"
"sendTranscript":"Transcript",
"closeWithReason":"fermer avec une raison"
},
"messages":{
"reopenTitle":"A rouvert ce ticket!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Le ticket est en cours de suppression...",
"none":"rien",
"reason":"raison"
"reason":"raison",
"deletedby":"supprimé par",
"closedby":"fermé par",
"modalreason":"Qu’elle est la raison pour fermer ce ticket?",
"chooseATicket": "Choisir un ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Ticket schließen",
"delete":"Ticket löschen",
"reopen":"Ticket wieder öffnen",
"sendTranscript":"Transcript-Datei senden"
"sendTranscript":"Transcript-Datei senden",
"closeWithReason":"Geschlossen mit dem Grund"
},
"messages":{
"reopenTitle":"Dieses Ticket wiedereröffnet!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Ticket wird gelöscht...",
"none":"none",
"reason":"reason"
"reason":"reason",
"deletedby":"Gelöscht von",
"closedby":"Geschlossen von",
"modalreason":"Was ist der Grund für das schließen des Tickets?",
"chooseATicket": "Wähle ein Ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Chiudi il ticket",
"delete":"Elimina il ticket",
"reopen":"Riapri il ticket",
"sendTranscript":"Trascrizione"
"sendTranscript":"Trascrizione",
"closeWithReason":"chiudi con un motivo"
},
"messages":{
"reopenTitle":"Riaperto questo ticket!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Il ticket sta per essere chiuso...",
"none":"nessuno",
"reason":"motivo"
"reason":"motivo",
"deletedby":"eliminato da",
"closedby":"chiuso da",
"modalreason":"Quale'è il motivo per chiudere il ticket?",
"chooseATicket": "Scegli un ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Fechar Ticket",
"delete":"Excluir Ticket",
"reopen":"Reabrir Ticket",
"sendTranscript":"Transcrição"
"sendTranscript":"Transcrição",
"closeWithReason":"close with reason"
},
"messages":{
"reopenTitle":"Reabriu este ticket!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Ticket está sendo deletado...",
"none":"none",
"reason":"reason"
"reason":"reason",
"deletedby":"deleted by",
"closedby":"closed by",
"modalreason":"What is the reason for closing this ticket?",
"chooseATicket": "Choose a ticket"
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Inchide ticket-ul",
"delete":"Sterge ticket-ul",
"reopen":"Re-deschide un ticket",
"sendTranscript":"Transcript"
"sendTranscript":"Transcript",
"closeWithReason":"Inchide cu motiv"
},
"messages":{
"reopenTitle":"Ticket Re-deschis!",
@@ -72,6 +73,11 @@
"gettingdeleted":"Ticket-ul se sterge...",
"none":"niciunul",
"reason":"Motiv"
"reason":"Motiv",
"deletedby":"Sters de",
"closedby":"Inchis de",
"modalreason":"Care este motivul pentru inchiderea acestui ticket?",
"chooseATicket": "Alege un ticket"
}
}
+91 -90
View File
@@ -10,96 +10,108 @@
"es-ES":"spanish",
"it":"italian",
"MISSING":"arabic,portuguese"
"MISSING":"arabic,portuguese",
"NOTAVAILABLE":"arabic,portuguese,czech"
},
"data":{
"help":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
},
"add":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
},
"remove":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
"en-GB":"A list of the available commands.",
"en-US":"A list of the available commands.",
"nl":"Een lijst met de beschikbare commands.",
"ro":"O lista a comenzilor disponibile.",
"de":"Eine Liste der verfügbaren Befehle.",
"cs":"A list of the available commands",
"fr":"Une liste des commandes.",
"es-ES":"Una lista de los comandos disponibles.",
"it":"Una lista di tutti i comandi disponibili."
},
"message":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
},
"newticket":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
"en-GB":"Spawn an embed with buttons.",
"en-US":"Spawn an embed with buttons.",
"nl":"Spawn een embed met knoppen.",
"ro":"Deschide un embed cu butoane.",
"de":"Sendet ein Embed mit Knöpfen.",
"cs":"Spawn an embed with buttons.",
"fr":"Créer un embed avec des boutons.",
"es-ES":"Genera un embed con botones.",
"it":"Genera un embed con un pulsante."
},
"close":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
"en-GB":"Close a ticket.",
"en-US":"Close a ticket.",
"nl":"Sluit een ticket",
"ro":"Inchide un ticket.",
"de":"Schließe ein Ticket.",
"cs":"Close a ticket.",
"fr":"Fermer un ticket.",
"es-ES":"Cierra un ticket.",
"it":"Chiudi un ticket."
},
"delete":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
"en-GB":"Delete a ticket.",
"en-US":"Delete a ticket.",
"nl":"Verwijder een ticket",
"ro":"Sterge un ticket.",
"de":"Lösche ein Ticket.",
"cs":"Delete a ticket.",
"fr":"Supprimer un ticket.",
"es-ES":"Elimina un ticket.",
"it":"Elimina un ticket."
},
"reopen":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
"en-GB":"Re-Open a ticket.",
"en-US":"Re-Open a ticket.",
"nl":"Heropen een ticket.",
"ro":"Re-deschide un ticket.",
"de":"Wiedereröffnung eines Tickets.",
"cs":"Re-Open a ticket.",
"fr":"Re-ouvrir un ticket.",
"es-ES":"Re-abre un ticket.",
"it":"Ri-Apri un ticket."
},
"add":{
"en-GB":"Add another user to a ticket.",
"en-US":"Add another user to a ticket.",
"nl":"Voeg een andere user toe aan een ticket.",
"ro":"Adauga un utilizator la acest ticket.",
"de":"Füge einen anderen Nutzer zum Ticket hinzu.",
"cs":"Add another user to a ticket.",
"fr":"Ajouter un utilisateur au ticket.",
"es-ES":"Agrega otro usuario al ticket.",
"it":"Aggiungi un membro al ticket"
},
"remove":{
"en-GB":"Remove a user from a ticket.",
"en-US":"Remove a user from a ticket.",
"nl":"Verwijder een user van een ticket.",
"ro":"Sterge un utilizator dintr-un ticket.",
"de":"Entferne einen Nutzer von dem Ticket.",
"cs":"Remove a user from a ticket.",
"fr":"Enlever quelqu’un du ticket.",
"es-ES":"Elimina otro usuario del ticket.",
"it":"Rimuovi un membro dal ticket"
},
"newticket":{
"en-GB":"Create a ticket",
"en-US":"Create a ticket",
"nl":"Maak een ticket aan",
"ro":"Creeaza un ticket.",
"de":"Erstelle ein Ticket.",
"cs":"Create a ticket",
"fr":"Créer un ticket",
"es-ES":"Crear un ticket.",
"it":"Crea un ticket"
},
"rename":{
"en-GB":"Rename a ticket channel.",
"en-US":"Rename a ticket channel.",
"nl":"Hernoem een ticket channel.",
"ro":"Redenumeste un ticket.",
"de":"Benenne einen Ticket Channel.",
"cs":"Rename a ticket channel",
"fr":"Renommer un ticket.",
"es-ES":"Renombrar un canal de ticket.",
"it":"Rinomina il canale di un ticket."
},
"claim":{
"en-GB":"",
@@ -122,17 +134,6 @@
"fr":"",
"es-ES":"",
"it":""
},
"rename":{
"en-GB":"",
"en-US":"",
"nl":"",
"ro":"",
"de":"",
"cs":"",
"fr":"",
"es-ES":"",
"it":""
}
}
}
+8 -2
View File
@@ -48,7 +48,8 @@
"close":"Cerrar ticket.",
"delete":"Eliminar ticket",
"reopen":"Re-Abrir ticket",
"sendTranscript":"Obtener transcript."
"sendTranscript":"Obtener transcript.",
"closeWithReason":"cerrar con razón"
},
"messages":{
"reopenTitle":"¡Ticket Re-Abierto!",
@@ -72,6 +73,11 @@
"gettingdeleted":"El ticket se está viendo eliminado...",
"none":"Ninguna.",
"reason":"Razón"
"reason":"Razón",
"deletedby":"eliminado por",
"closedby":"cerrado por",
"modalreason":"Cúal es la razón para cerrar este ticket?",
"chooseATicket": "Elije un ticket"
}
}