Merge pull request #16 from DJj123dj/dev

2.2.0 update
This commit is contained in:
Jasper
2022-07-18 09:37:22 +02:00
committed by GitHub
9 changed files with 191 additions and 16 deletions
+18 -6
View File
@@ -1,8 +1,13 @@
### large announcement: ## We need translators!
[![open moderation](./openmod.png)](https://www.dj-dj.be/projects/open-moderation) If you know a language that isn't already in open ticket and you can write json,
then is this the job for you!
make a ticket in our server to start!
*if you translate, you will come in the credits*
# open-ticket # 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-2.1.2%20stable-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v2.1.2) [![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) [![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-2.2.0%20stable-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v2.2.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! This is an open-source discord ticket bot, you can configure it and it comes with cool features like transcripts & custom options!
@@ -14,6 +19,7 @@ This is an open-source discord ticket bot, you can configure it and it comes wit
- DJ-Lite: for doing the administration - DJ-Lite: for doing the administration
- Sanke: for translation & new ideas - Sanke: for translation & new ideas
- ExothDE: for translation - ExothDE: for translation
- 1x1: for translation
- Everyone that reported a bug - Everyone that reported a bug
## features ## features
@@ -35,11 +41,14 @@ This is an open-source discord ticket bot, you can configure it and it comes wit
## installation ## installation
**You need `node.js 16` to run this project!** **You need `node.js 16` to run this project!**
**At this moment you still need discord.js v13!**
This will change soon!
You can clone or download this project. You can clone or download this project.
### packages ### packages
- chalk => version `latest` - chalk => version `latest`
- discord.js => version `latest` - discord.js => version `13.8.0`
- express => version `latest` - express => version `latest`
- node-localstorage => version `latest` - node-localstorage => version `latest`
@@ -52,7 +61,7 @@ if there are any errors, you can open an **issue on github** or **contact me in
### config ### config
Our config documentation is moved to another file: Our config documentation is moved to another file:
[click here to view](https://www.github.com/DJj123dj/open-ticket/wiki/config-v2.1.2) [click here to view](https://www.github.com/DJj123dj/open-ticket/wiki/config-v2.2.0)
### 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
@@ -64,8 +73,11 @@ You can also configure your own permissions
## information ## information
_v2.1.2 stable_ _v2.2.0 stable_
changelog: [click here](https://www.github.com/DJj123dj/open-ticket/wiki/Changelog) changelog: [click here](https://www.github.com/DJj123dj/open-ticket/wiki/Changelog)
© 2022 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.com/invite/26vT9wt3n3) © 2022 - DJdj Development | [website](https://www.dj-dj.be) | [discord](https://discord.com/invite/26vT9wt3n3)
### large announcement:
[![open moderation](./openmod.png)](https://www.dj-dj.be/projects/open-moderation)
+6
View File
@@ -20,6 +20,12 @@ module.exports = () => {
client.on("messageCreate",msg => { client.on("messageCreate",msg => {
if (!msg.content.startsWith(config.prefix)) return if (!msg.content.startsWith(config.prefix)) return
var args = msg.content.split(config.prefix) var args = msg.content.split(config.prefix)
if (!args[1]){
msg.channel.send({embeds:[helpEmbed]})
log("command","someone used the 'help' command",[{key:"user",value:msg.author.tag}])
return
}
if (!args[1].startsWith("close") && !args[1].startsWith("delete") && !args[1].startsWith("remove") && !args[1].startsWith("add") && !args[1].startsWith("msg") && !args[1].startsWith("remove") && !args[1].startsWith("rename") && !args[1].startsWith("reopen")){ if (!args[1].startsWith("close") && !args[1].startsWith("delete") && !args[1].startsWith("remove") && !args[1].startsWith("add") && !args[1].startsWith("msg") && !args[1].startsWith("remove") && !args[1].startsWith("rename") && !args[1].startsWith("reopen")){
+2 -2
View File
@@ -11,7 +11,7 @@
"status":{ "status":{
"enabled":true, "enabled":true,
"type":"PLAYING", "type":"PLAYING",
"text":"!ticket" "text":"!ticket help"
}, },
"system":{ "system":{
@@ -79,7 +79,7 @@
"name":"Choose Your Ticket", "name":"Choose Your Ticket",
"description":"You can click one of the buttons below!\nYou can also customize all the embeds now!", "description":"You can click one of the buttons below!\nYou can also customize all the embeds now!",
"enableFooter":true, "enableFooter":true,
"footer":"Open Ticket v2.1.2 - I'm a footer!", "footer":"Open Ticket v2.2.0 - I'm a footer!",
"enableThumbnail":false, "enableThumbnail":false,
"thumbnail":"https://www.example.com/catmemes/cat.png", "thumbnail":"https://www.example.com/catmemes/cat.png",
"color":"#ffffff", "color":"#ffffff",
+3 -1
View File
@@ -267,7 +267,7 @@ exports.checker = async () => {
//languagefile //languagefile
checkType(config.languagefile,"string","languagefile") checkType(config.languagefile,"string","languagefile")
const lf = config.languagefile const lf = config.languagefile
if (!lf.startsWith("custom") && !lf.startsWith("english") && !lf.startsWith("dutch") && !lf.startsWith("romanian") && !lf.startsWith("german")){ if (!lf.startsWith("custom") && !lf.startsWith("english") && !lf.startsWith("dutch") && !lf.startsWith("romanian") && !lf.startsWith("german") && !lf.startsWith("arabic")){
createError("'languagefile' | invalid language, more info in the wiki") createError("'languagefile' | invalid language, more info in the wiki")
} }
@@ -296,6 +296,8 @@ exports.checker = async () => {
checkType(config.system["has@everyoneaccess"],"boolean","system/has@everyoneaccess") checkType(config.system["has@everyoneaccess"],"boolean","system/has@everyoneaccess")
if (config.system.member_role != "" && config.system.member_role != " " && config.system.member_role != "false" && config.system.member_role != "null" && config.system.member_role != "0"){ if (config.system.member_role != "" && config.system.member_role != " " && config.system.member_role != "false" && config.system.member_role != "null" && config.system.member_role != "0"){
checkDiscord("roleid",config.system.member_role,"system/member_role") checkDiscord("roleid",config.system.member_role,"system/member_role")
}else{
createWarn("'system/member_role' | You don't have a member role, but it's recommended!")
} }
checkType(config.system.closeMode,"string","system/closeMode") checkType(config.system.closeMode,"string","system/closeMode")
if (!["normal","adminonly"].includes(config.system.closeMode)){ if (!["normal","adminonly"].includes(config.system.closeMode)){
+1
View File
@@ -12,6 +12,7 @@ else if (config.languagefile.startsWith("english")) localLanguage = require("../
else if (config.languagefile.startsWith("german")) localLanguage = require("../language/german.json") else if (config.languagefile.startsWith("german")) localLanguage = require("../language/german.json")
else if (config.languagefile.startsWith("french")) localLanguage = require("../language/french.json") else if (config.languagefile.startsWith("french")) localLanguage = require("../language/french.json")
else if (config.languagefile.startsWith("romanian")) localLanguage = require("../language/romanian.json") else if (config.languagefile.startsWith("romanian")) localLanguage = require("../language/romanian.json")
else if (config.languagefile.startsWith("arabic")) localLanguage = require("../language/arabic.json")
const errorLog = async () => { const errorLog = async () => {
const chalk = await (await import("chalk")).default const chalk = await (await import("chalk")).default
+7 -5
View File
@@ -35,11 +35,13 @@ module.exports = () => {
var customId = interaction.customId var customId = interaction.customId
}else return }else return
if (interaction.customId.startsWith("newT")){ if (interaction.isButton()){
const optionid = interaction.customId.split("newT")[1] if (interaction.customId.startsWith("newT")){
if (!optionid){ const optionid = interaction.customId.split("newT")[1]
interaction.reply({embeds:[bot.errorLog.serverError(l.errors.ticketDoesntExist)]}) if (!optionid){
return interaction.reply({embeds:[bot.errorLog.serverError(l.errors.ticketDoesntExist)]})
return
}
} }
} }
+79
View File
@@ -0,0 +1,79 @@
{
"errors":{
"missingArgsTitle":"حجج باطلة",
"missingArgsDescription":"حجة مفقودة",
"noPermsTitle":"ليس لديك إذن",
"noPermsDescription":"ليس لديك إذن لاستخدام هذا\nأنت بحاجة إلى إذن "ADMINISTRATOR" أو أن تكون في قائمة الأدوار المسموح بها!",
"chooseFromListTitle":"بطاقة التعريف غير صالحة",
"chooseFromListDescription":"اختر أحد المعرفات أدناه:",
"boterror":"مشكلة في الروبوت",
"notInTicketTitle":"أنت لست في تذكرة!",
"notInTicketDescription":"هذا الأمر لا يعمل خارج التذاكر!",
"ticketDoesntExist":"هذه التذكرة لم تعد موجودة!",
"roleDoesntExist":"هذا الدور لم يعد موجودًا!",
"anotherOption":"هذا الخيار ليس تذكرة بل نوع آخر!",
"maxAmountTitle":"بلغ الحد الأقصى!",
"maxAmountDescription":"لقد وصلت إلى الحد الأقصى لعدد التذاكر المسموح بها!\nلذلك لا يمكنك إنشاء واحدة جديدة!",
"somethingWentWrong":"هناك خطأ ما!**\nالرجاء المحاولة مرة أخرى!",
"somethingWentWrongTranscript":"حدث خطأ ما أثناء كتابة النص!**\nالرجاء المحاولة مرة أخرى!"
},
"commands":{
"userAddedTitle":"تمت إضافة المستخدم!",
"userAddedDescription":"{0} يضاف إلى هذه التذكرة!",
"userRemovedTitle":"تمت إزالة المستخدم!",
"userRemovedDescription":"{0} تمت إزالته من هذه التذكرة!",
"renameTitle":"تم تغيير الاسم!",
"renameWarning":"تحذير: يمكنك فقط تغيير اسم القناة مرتين في الدقيقة!\n(هذا يرجع إلى حدود معدل الخلاف)",
"closeTitle":"أغلق هذه التذكرة!",
"closeDescription":"يمكنك إغلاق هذه التذكرة بالضغط على الزر أدناه!",
"deleteTitle":"احذف هذه التذكرة!",
"deleteDescription":"يمكنك حذف هذه التذكرة بالضغط على الزر أدناه!",
"reopenTitle":"أعد فتح هذه التذكرة!",
"reopenDescription":"يمكنك إعادة فتح هذه التذكرة بالضغط على الزر أدناه!",
"ticketWarning":"التضمين في الرسالة أدناه!",
"maxTicketWarning":"**تحذير:** _يمكنك فقط إنشاء ملفات {0} تذكرة في كل مرة!_"
},
"helpMenu":{
"title":"قائمة التعليمات:",
"header1":"**اذهب إلى {0} لإنشاء تذكرة!**\n\n",
"header2":"**قم بتشغيل الأمر `/new` أو `/ticket` لإنشاء تذكرة!**\n\n",
"msgCmd":"تفرخ تضمين مع الأزرار. (المسؤولون فقط)",
"renameCmd":"إعادة تسمية تذكرة. (بدون مسافات)",
"closeCmd":"أغلق التذكرة.",
"deleteCmd":"حذف التذكرة.",
"addCmd":"أضف مستخدمًا إلى التذكرة.",
"removeCmd":"إزالة مستخدم من التذكرة.",
"reopenCmd":"أعد فتح التذكرة بعد إغلاقه."
},
"buttons":{
"close":"إغلاق التذكرة",
"delete":"حذف التذكرة",
"reopen":"إعادة فتح التذكرة",
"sendTranscript":"إرسال ملف النص"
},
"messages":{
"reopenTitle":"أعيد فتح هذه التذكرة!",
"reopenDescription":"لا تتردد في التحدث مرة أخرى!",
"closedTitle":"أغلقت هذه التذكرة!",
"closedDescription":"يمكن للمسؤولين فقط التحدث في هذه التذكرة الآن!\n\n*انقر فوق الزر أدناه لحذف هذه التذكرة أو إعادة فتحها!*",
"createdTitle":"تم إنشاء التذكرة!",
"createdDescription":"تم إنشاء تذكرتك ، يمكنك اكتشافها عن طريق ping",
"newTicketDmTitle":"تذكرة جديدة!",
"closedTicketDmTitle":"تم إغلاق التذكرة!",
"deletedTicketDmTitle":"تم حذف التذكرة!",
"closedTicketDmDescription":"تم إغلاق تذكرتك!",
"deletedTicketDmDescription":"تم حذف تذكرتك!",
"reopenTicketDmTitle":"أعيد فتح التذكرة!",
"reopenTicketDmDescription":"تم إعادة فتح تذكرتك!",
"newTranscriptTitle":"نسخة جديدة هنا!",
"newTranscriptDescription":"يمكنك العثور على النص في الملف النصي أعلاه!",
"hereIsTheTranscript":"هذا هو النص:",
"chooseCategory":"اختر فئة:"
}
}
+73
View File
@@ -0,0 +1,73 @@
{
"errors":{
"missingArgsTitle":"Arguments invalides !",
"missingArgsDescription":"Argument manquant",
"noPermsTitle":"Pas de permissions!",
"noPermsDescription":"Vous n'avez pas les bons rôles pour exécuter cette commande !\nVous avez besoin de la permission `ADMINISTRATOR` ou d'être dans la liste des rôles autorisés !",
"chooseFromListTitle":"Invalid ID",
"chooseFromListDescription":"Choisissez l'un des identifiants ci-dessous:",
"boterror":"Bot Error!",
"notInTicketTitle":"Vous n'êtes pas dans un ticket !",
"notInTicketDescription":"Cette commande ne fonctionne pas en dehors des tickets !",
"ticketDoesntExist":"Ce billet n'existe plus !",
"roleDoesntExist":"Ce rôle n'existe plus !",
"anotherOption":"Cette option n'est pas un ticket mais un autre type !",
"maxAmountTitle":"Montant max atteint !",
"maxAmountDescription":"Vous avez atteint le nombre maximum de tickets autorisés !\nVous ne pouvez donc pas en créer un nouveau !",
"somethingWentWrong":"Une erreur s'est produite !**\nVeuillez réessayer une autre fois !",
"somethingWentWrongTranscript":"Une erreur s'est produite lors de la création de la transcription !**\nVeuillez réessayer une autre fois !"
},
"commands":{
"userAddedTitle":"Utilisateur ajouté !",
"userAddedDescription":"{0} est ajouté à ce billet !",
"userRemovedTitle":"Utilisateur supprimé!",
"userRemovedDescription":"{0} est supprimé de ce ticket!",
"renameTitle":"Le nom est changé !",
"renameWarning":"Attention : vous ne pouvez modifier le nom de la chaîne que 2 fois par minute !\n(ceci est dû aux limites du taux de discorde)",
"closeTitle":"Fermez ce ticket !",
"closeDescription":"Vous pouvez fermer ce ticket en cliquant sur le bouton ci-dessous !",
"deleteTitle":"Supprimez ce billet !",
"deleteDescription":"Vous pouvez supprimer ce ticket en cliquant sur le bouton ci-dessous !",
"reopenTitle":"Ré-ouvrez ce ticket !",
"reopenDescription":"Vous pouvez rouvrir ce ticket en cliquant sur le bouton ci-dessous !",
"ticketWarning":"L'intégration est dans le message ci-dessous !",
"maxTicketWarning":"**Attention :** _Vous ne pouvez créer que {0} billet(s) à la fois !_"
},
"helpMenu":{
"title":"Menu d'aide:",
"header1":"**Allez à {0} pour créer un ticket !**\n\n",
"header2":"**Exécutez la commande `/new` ou `/ticket` pour créer un ticket!**\n\n",
"msgCmd":"Créez une intégration avec des boutons. (administrateurs uniquement)",
"renameCmd":"Renommer un ticket. (sans espaces)",
"closeCmd":"Fermer un ticket.",
"deleteCmd":"Supprimer un billet.",
"addCmd":"Ajouter un utilisateur au ticket.",
"removeCmd":"Supprimer un utilisateur du ticket.",
"reopenCmd":"Re-Open a ticket after it was closed."
},
"buttons":{
"close":"Fermer le ticket",
"delete":"Supprimer le billet",
"reopen":"Billet de réouverture",
"sendTranscript":"Envoyer le fichier de transcription"
},
"messages":{
"reopenTitle":"A rouvert ce ticket!",
"reopenDescription":"N'hésitez pas à reparler!",
"closedTitle":"Fermé ce ticket",
"closedDescription":"Seuls les administrateurs peuvent parler dans ce ticket maintenant !\n\n*Cliquez sur le bouton ci-dessous pour supprimer ou rouvrir ce ticket !*",
"createdTitle":"Ticket créé !",
"createdDescription":"Votre ticket est créé, vous pouvez le détecter par un ping !",
"newTicketDmTitle":"Nouveau ticket!",
"newTranscriptTitle":"Une nouvelle transcription est ici!",
"newTranscriptDescription":"Vous pouvez trouver la transcription dans le fichier texte ci-dessus !",
"hereIsTheTranscript":"Voici la transcription :",
"chooseCategory":"choisissez une catégorie:"
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "open-ticket", "name": "open-ticket",
"version": "2.1.2", "version": "2.2.0",
"description": "This is an open-source discord ticket bot, you can configure it and it comes with cool features like a transcript.", "description": "This is an open-source discord ticket bot, you can configure it and it comes with cool features like a transcript.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@@ -14,7 +14,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"chalk": "^5.0.1", "chalk": "^5.0.1",
"discord.js": "^13.8.0", "discord.js": "13.8.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"