Compare commits

...
13 Commits
Author SHA1 Message Date
Jasper 739ad81f3f v3.3.3 MAJOR FIX!
v3.3.3 MAJOR FIX!
2023-04-22 16:53:32 +02:00
DJj123dj a6f67a9452 v3.3.3 MAJOR FIX! 2023-04-22 16:52:43 +02:00
Jasper 56a6540663 v3.3.2 extra
v3.3.2 extra
2023-04-19 18:45:55 +02:00
DJj123dj 5f8812d261 v3.3.2 push 2 2023-04-19 18:45:12 +02:00
Jasper 7a3dcf4c42 Open Ticket v3.3.2
Open Ticket v3.3.2
2023-04-19 18:43:38 +02:00
DJj123dj 7cebd4dd6a Merge branch 'dev' of https://github.com/DJj123dj/open-ticket into dev 2023-04-19 18:39:23 +02:00
DJj123dj 27912a0c37 v3.3.2 2023-04-19 18:39:21 +02:00
Jasper 67871d885a Update dev
update dev branch
2023-03-23 14:22:29 +01:00
Jasper 1bd0d013ed Update config.json 2023-03-23 14:21:39 +01:00
Jasper a074a17519 Update issue templates 2023-03-23 14:15:25 +01:00
Jasper 67af96ef5c Update SECURITY.md 2023-03-23 14:10:38 +01:00
Jasper a041f28cf7 Update CONTRIBUTING.md 2023-03-23 14:10:03 +01:00
Jasper a8c9c2ea8d Create SECURITY.md 2023-03-23 13:35:08 +01:00
21 changed files with 184 additions and 69 deletions
+42 -3
View File
@@ -1,3 +1,42 @@
# comming soon
For now on, you can create a ticket in our server:
https://discord.dj-dj.be
# Contributing
## Translation
### Step 1: checking
1. [Check if the language isn't already in open ticket!](/language/)
2. Check if the current translation is up-to-date!
3. Can you edit/write JSON?
If there is translation missing & you can write json, then go to the next step!
### Step 2: translating
**RULES:**
- Always upload to the [__`dev` branch!__](https://github.com/DJj123dj/open-ticket/tree/dev)
- Don't change anything else, except the translation you are adding!
- Translations are checked before uploading, so don't write things that aren't specified in the json file
- Always start translating from `english.json` or `custom.json`! Never from another language.
If you translate, you need to change 2 files! The first one is required, the other one is optional & will be added by us if you don't do it!
1. add `yourlanguage.json` to the `/language/` directory
2. (OPTIONAL) add your discord name & tag in the translator table in `README.md`
### Step 3: waiting
Translations will always be added in the **next version** of Open Ticket! They will never be added to the `main` branch directly without anything else! This means that it can take some time before your translation is in the official version!
## Writing plugins
We are going to create an official repository for plugins soon!
But don't worry! You can already write some plugins!
**RULES:**
- Always specify the versions that the plugin is compatible with!
- If extra npm dependencies are needed, then they also need to be specified!
- If there are errors while you write a plugin/edit the code in some way. Then we can't help you with fixing the bug. We only fix bugs that are part of an unedited version of Open Ticket!
## Other versions of contributing
If you want to contribute in another way, feel free to join [our discord server](https://discord.dj-dj.be) & talk about how you are going to do it. We will always help you!
<br>
CONTRIBUTING GUIDELINES - Last updated: 23/3/2023<br>
© DJdj Development<br><br>
Website: https://www.dj-dj.be <br>
Discord: https://discord.dj-dj.be <br>
Email: support@dj-dj.be <br>
Open Ticket website: https://openticket.dj-dj.be
+2 -2
View File
@@ -1,9 +1,9 @@
---
name: Bug report
about: Create a report to help us improve Open Ticket
about: Report bugs to help us improve open ticket!
title: "[BUG] your bug"
labels: bug
assignees: ''
assignees: DJj123dj
---
+2 -2
View File
@@ -1,9 +1,9 @@
---
name: Plugin
about: Show your open ticket plugins here!
about: Show your plugin to the developers from open ticket!
title: "[PLUGIN] your plugin"
labels: plugin
assignees: ''
assignees: DJj123dj
---
+41
View File
@@ -0,0 +1,41 @@
# Security Policy
## Supported Versions
Support for Open Ticket is only available for the versions specified below!
✅ Supported
🟧 Partially Supported
❌ Not Supported
| Version | Supported |
| ------- | ------------------ |
| 3.3.3 | :white_check_mark: |
| 3.3.0 | 🟧 |
| 3.2.2 | 🟧 |
| < 3.2.2 | :x: |
## Reporting a Vulnerability
You can report Vulnerabilities, errors & bugs in the following ways:
- Creating an issue on github
- Creating a ticket in our discord server
- Reporting the bug in DM on discord (DJj123dj#1706)
- Emailing support@dj-dj.be
If your report an error, be clear about what is going on.
Specify the version & language of the bot together with when the error happend. (for example: when I click the close button)
Send screenshots from the error if possible, and send openticketdebug.txt (or a screenshot of it) to us.
Don't just report the error and never reply again! It can be possible that we need you for more information!
## Contributing
Visit [Contributing.md](/.github/CONTRIBUTING.md) for rules about translating & adding features!
<br>
SECURITY POLICY - Last updated: 23/3/2023<br>
© DJdj Development<br><br>
Website: https://www.dj-dj.be <br>
Discord: https://discord.dj-dj.be <br>
Email: support@dj-dj.be <br>
Open Ticket website: https://openticket.dj-dj.be
+2 -2
View File
@@ -1,6 +1,6 @@
<img src="https://www.dj-dj.be/wp-content/uploads/2023/02/open-ticket-cropped.png" alt="Open Ticket" width="600px">
[![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.3.1-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.3.1) [![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) [![stars](https://img.shields.io/github/stars/djj123dj/open-ticket?color=yellow&label=stars&logo=github&style=flat-square)](https://docs.openticket.dj-dj.be)
[![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.3.3-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.3.3) [![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) [![stars](https://img.shields.io/github/stars/djj123dj/open-ticket?color=yellow&label=stars&logo=github&style=flat-square)](https://docs.openticket.dj-dj.be)
### Open Ticket
Open Ticket is of the most customisable discord ticket bots of all time!
@@ -62,7 +62,7 @@ Translators
|Slovenian |n1kkec#5341 |
## links
current version: _v3.3.1_
current version: _v3.3.3_
</br>changelog: [click here](https://docs.openticket.dj-dj.be/other/changelog)
</br>documentation: [click here](https://docs.openticket.dj-dj.be/quick-start)
+6 -7
View File
@@ -34,11 +34,11 @@ module.exports = () => {
const hiddendata = hdraw.hiddenData
const ticketId = hiddendata.data.find(d => d.key == "type").value
hiddendata.data.push({key:"claimedby",value:interaction.user.id})
storage.set("claimData",interaction.channel.id,interaction.user.id)
hiddendata.data.push({key:"claimedby",value:claimingUser.id})
storage.set("claimData",msg.channel.id,claimingUser.id)
const newEmbed = new embed(firstmsg.embeds[0].data)
.setFooter({text:"claimed by: "+interaction.user.tag,iconURL:interaction.user.displayAvatarURL()})
.setFooter({text:"claimed by: "+msg.author.tag,iconURL:msg.author.displayAvatarURL()})
.setDescription(hdraw.description+bot.hiddenData.writeHiddenData(hiddendata.type,hiddendata.data))
if (firstmsg.components[0].components[1] && firstmsg.components[0].components[1].disabled){
@@ -66,8 +66,7 @@ module.exports = () => {
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
permsChecker.sendUserNoPerms(interaction.user)
interaction.reply({content:":x: "+l.errors.noPermsTitle,ephemeral:true})
return
return interaction.reply({content:":x: "+l.errors.noPermsTitle,ephemeral:true})
}
await interaction.deferReply()
@@ -80,8 +79,8 @@ module.exports = () => {
const hiddendata = hdraw.hiddenData
const ticketId = hiddendata.data.find(d => d.key == "type").value
hiddendata.data.push({key:"claimedby",value:interaction.user.id})
storage.set("claimData",interaction.channel.id,interaction.user.id)
hiddendata.data.push({key:"claimedby",value:user.id})
storage.set("claimData",interaction.channel.id,user.id)
const newEmbed = new embed(firstmsg.embeds[0].data)
.setFooter({text:"claimed by: "+user.tag,iconURL:user.displayAvatarURL()})
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = () => {
const ticketId = hiddendata.data.find(d => d.key == "type").value
hiddendata.data.push({key:"claimedby",value:"false"})
storage.set("claimData",interaction.channel.id,"false")
storage.set("claimData",msg.channel.id,"false")
const newEmbed = new embed(firstmsg.embeds[0].data)
.setDescription(hdraw.description+bot.hiddenData.writeHiddenData(hiddendata.type,hiddendata.data))
+10 -3
View File
@@ -40,8 +40,9 @@
"color":"gray",
"adminroles":["role id"],
"readonlyAdminroles":["role id"],
"channelprefix":"question-",
"category":"category id",
"category":"category id (or leave empty)",
"message":"You created a ticket!",
"enableDmOnOpen":true,
"ticketmessage":"The staff will help you soon!\n\n*Click on the button below to close the ticket!*",
@@ -101,11 +102,17 @@
"dropdown":false,
"enableFooter":false,
"footer":"Open Ticket v3.3.1 - I'm a footer!",
"footer":"Open Ticket v3.3.3 - I'm a footer!",
"enableFooterImage":false,
"footerImage":"https://www.example.com/catmemes/cat.png",
"enableThumbnail":false,
"thumbnail":"https://www.example.com/catmemes/cat.png",
"enableImage":false,
"image":"https://www.example.com/catmemes/cat.png",
"enableCustomColor":false,
"color":"#ffffff",
@@ -130,4 +137,4 @@
}
}
]
}
}
@@ -52,6 +52,8 @@ module.exports = () => {
}else{
firstmsg.edit({components:[bot.buttons.firstmsg.firstmsgRowNormalNoClaim],embeds:[newEmbed]})
}
interaction.channel.send({embeds:[bot.embeds.commands.claimEmbed(interaction.user,interaction.user)]})
})
})
}
@@ -23,7 +23,7 @@ module.exports = () => {
if (interaction.customId != "OTcloseTicketTrue") return
try {
interaction.deferUpdate()
await interaction.deferUpdate()
} catch{}
if (closeTicketButtonChecker == true) return
@@ -22,7 +22,7 @@ module.exports = () => {
if (!interaction.isButton()) return
if (interaction.customId != "OTdeleteTicketTrue") return
interaction.deferUpdate()
await interaction.deferUpdate()
if (deleteTicketButtonChecker == true) return
deleteTicketButtonChecker = true
@@ -62,7 +62,7 @@ module.exports = () => {
if (!interaction.isButton()) return
if (interaction.customId != "OTdeleteTicketTrue1") return
interaction.deferUpdate()
await interaction.deferUpdate()
if (deleteTicketButtonChecker1 == true) return
deleteTicketButtonChecker1 = true
@@ -17,11 +17,11 @@ const bs = discord.ButtonStyle
module.exports = () => {
//REOPEN
client.on("interactionCreate",(interaction) => {
client.on("interactionCreate",async (interaction) => {
if (!interaction.isButton()) return
if (interaction.customId != "OTreopenTicket") return
interaction.deferUpdate()
await interaction.deferUpdate()
interaction.message.edit({embeds:[bot.embeds.commands.reopenEmbed(interaction.user)],components:[bot.buttons.close.openRowNormal]})
require("../../../ticketActions/ticketReopener").reopenTicket(interaction.guild,interaction.channel,interaction.user)
})
+12 -12
View File
@@ -16,22 +16,22 @@ const bs = discord.ButtonStyle
module.exports = () => {
//CLOSE
client.on("interactionCreate",interaction => {
client.on("interactionCreate",async interaction => {
if (!interaction.isButton()) return
if (interaction.customId != "OTcloseTicket") return
try {
interaction.deferUpdate()
await interaction.deferUpdate()
} catch{}
interaction.message.edit({components:[bot.buttons.verifybars.closeVerifyBar]})
})
client.on("interactionCreate",interaction => {
client.on("interactionCreate",async interaction => {
if (!interaction.isButton()) return
if (interaction.customId != "OTcloseTicketFalse") return
try {
interaction.deferUpdate()
await interaction.deferUpdate()
} catch{}
if (interaction.message.pinned && interaction.message.author.id == client.user.id){
@@ -47,22 +47,22 @@ module.exports = () => {
})
//DELETE
client.on("interactionCreate",interaction => {
client.on("interactionCreate",async interaction => {
if (!interaction.isButton()) return
if (interaction.customId != "OTdeleteTicket") return
try {
interaction.deferUpdate()
await interaction.deferUpdate()
} catch{}
interaction.message.edit({components:[bot.buttons.verifybars.deleteVerifyBar]})
})
client.on("interactionCreate",interaction => {
client.on("interactionCreate",async interaction => {
if (!interaction.isButton()) return
if (interaction.customId != "OTdeleteTicketFalse") return
try {
interaction.deferUpdate()
await interaction.deferUpdate()
} catch{}
if (interaction.message.pinned && interaction.message.author.id == client.user.id){
@@ -78,22 +78,22 @@ module.exports = () => {
})
//DELETE NO TRANSCRIPT
client.on("interactionCreate",interaction => {
client.on("interactionCreate",async interaction => {
if (!interaction.isButton()) return
if (interaction.customId != "OTdeleteTicket1") return
try {
interaction.deferUpdate()
await interaction.deferUpdate()
} catch{}
interaction.message.edit({components:[bot.buttons.verifybars.delete1VerifyBar]})
})
client.on("interactionCreate",interaction => {
client.on("interactionCreate",async interaction => {
if (!interaction.isButton()) return
if (interaction.customId != "OTdeleteTicketFalse1") return
try {
interaction.deferUpdate()
await interaction.deferUpdate()
} catch{}
interaction.message.edit({components:[bot.buttons.close.closeCommandRow]})
})
+2 -2
View File
@@ -11,7 +11,7 @@ const APIEvents = require("./api/modules/events")
module.exports = async () => {
const chalk = await (await import("chalk")).default
client.on("interactionCreate",(interaction) => {
client.on("interactionCreate",async (interaction) => {
if (!interaction.isButton() && !interaction.isStringSelectMenu()) return
if (interaction.isButton() && !interaction.customId.startsWith("newR")) return
if (interaction.isStringSelectMenu() && !(interaction.customId == "OTdropdownMenu")) return
@@ -32,7 +32,7 @@ module.exports = async () => {
return
}else{
try {
interaction.deferUpdate()
await interaction.deferUpdate()
} catch{}
}
+29 -16
View File
@@ -10,13 +10,12 @@ const storage = bot.storage
module.exports = () => {
//dropdown placeholder
client.on("interactionCreate",(interaction) => {
client.on("interactionCreate",async (interaction) => {
if (!interaction.isStringSelectMenu()) return
if (interaction.customId != "OTdropdownMenu") return
if (interaction.values.includes("OTChooseTicket")){
interaction.deferUpdate()
await interaction.deferUpdate()
}
})
@@ -37,7 +36,7 @@ module.exports = () => {
if (interaction.customId.startsWith("OTnewT")){
const optionid = interaction.customId.split("OTnewT")[1]
if (!optionid){
interaction.reply({embeds:[bot.errorLog.serverError(l.errors.ticketDoesntExist)]})
await interaction.reply({embeds:[bot.errorLog.serverError(l.errors.ticketDoesntExist)]})
return
}
}
@@ -48,12 +47,11 @@ module.exports = () => {
//ticketoptions from config
const currentTicketOptions = configParser.getTicketById(customId)
if (currentTicketOptions == false) return interaction.reply({embeds:[bot.errorLog.serverError(l.errors.anotherOption)]})
if (interaction.isButton()){
try {
if (config.system.answerInEphemeralOnOpen) await interaction.deferReply({ephemeral:true})
await interaction.deferReply({ephemeral:config.system.answerInEphemeralOnOpen})
} catch{}
}else if (interaction.isChatInputCommand()){
await interaction.deferReply({ephemeral:config.system.answerInEphemeralOnOpen})
@@ -110,9 +108,7 @@ module.exports = () => {
type:"role",
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
})
}catch{
log("system","invalid role! At 'config.json => main_adminroles:"+index)
}
}catch{}
})
//add ticket adminroles
@@ -131,9 +127,28 @@ module.exports = () => {
type:"role",
allow:[pfb.AddReactions,pfb.AttachFiles,pfb.EmbedLinks,pfb.SendMessages,pfb.ViewChannel]
})
}catch{
log("system","invalid role! At 'config.json => options/ticket/...:"+index)
}
}catch{}
}
})
//add ticket adminroles
/**
* @type {String[]}
*/
const readonlyTicketadmin = currentTicketOptions.readonlyAdminroles
readonlyTicketadmin.forEach((role,index) => {
if (!config.adminRoles.includes(role) && !currentTicketOptions.adminroles.includes(role)){
try {
const adminrole = guild.roles.cache.find(r => r.id == role)
if (!adminrole) return
permissionsArray.push({
id:adminrole,
type:"role",
allow:[pfb.AddReactions,pfb.ViewChannel],
deny:[pfb.SendMessages,pfb.AttachFiles,pfb.EmbedLinks]
})
}catch{}
}
})
@@ -148,9 +163,7 @@ module.exports = () => {
deny:[pfb.ViewChannel]
})
}
}catch{
log("system","invalid role! At 'config.json => system/memberRole")
}
}catch{}
}
//create the channel
@@ -166,7 +179,7 @@ module.exports = () => {
if (currentTicketOptions.autoclose.enable) storage.set("autocloseTickets",ticketChannel.id,currentTicketOptions.autoclose.inactiveHours)
const hiddendata = bot.hiddenData.writeHiddenData("ticketdata",[{key:"type",value:currentTicketOptions.id},{key:"openerid",value:interaction.user.id},{key:"createdms",value:new Date().getTime()}])
var ticketEmbed = new discord.EmbedBuilder()
//.setAuthor({name:interaction.user.id})
.setColor(config.color)
@@ -1,6 +1,6 @@
{
"version":"1.0.0",
"otversion":"3.3.1",
"otversion":"3.3.3",
"style":{
"enableCustomBackground":false,
"backgroundModus":"color OR image",
+4 -4
View File
@@ -6,7 +6,7 @@ const l = bot.language
//==================
//OTTicketOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color: "red"|"green"|"blue"|"gray",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, closedCategory:{enable:Boolean,id:String}, autoclose:{enable:Boolean,inactiveHours:Number} }} OTTicketOptions */
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color: "red"|"green"|"blue"|"gray",adminroles: String[], readonlyAdminroles: String[], channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, closedCategory:{enable:Boolean,id:String}, autoclose:{enable:Boolean,inactiveHours:Number} }} OTTicketOptions */
//OTRoleOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",enableDmOnOpen:Boolean}} OTRoleOptions */
@@ -16,13 +16,13 @@ const l = bot.language
//OTConfigMessage
/**@typedef {{id: string, name: string, description: string, dropdown: boolean, enableFooter: boolean, footer: string, enableThumbnail: boolean, thumbnail: string, enableCustomColor: boolean, color: string, options: string[], other:{enableTicketExplaination: boolean, enableMaxTicketsWarning: boolean, customDropdownPlaceholder:{enable:Boolean,text:String}, customCategoryText:{enable:Boolean,text:String}, embedTitleURL:{enable:Boolean,url:String} } }} OTConfigMessage*/
/**@typedef {{id: string, name: string, description: string, dropdown: boolean, enableFooter: boolean, footer: string, enableFooterImage: boolean, footerImage: string, enableThumbnail: boolean, thumbnail: string, enableImage: boolean, image: string, enableCustomColor: boolean, color: string, options: string[], other:{enableTicketExplaination: boolean, enableMaxTicketsWarning: boolean, customDropdownPlaceholder:{enable:Boolean,text:String}, customCategoryText:{enable:Boolean,text:String}, embedTitleURL:{enable:Boolean,url:String} } }} OTConfigMessage*/
//OTAllOptions
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, url:String, closedCategory:{enable:Boolean,id:String}, autoclose:{enable:Boolean,inactiveHours:Number}}} OTAllOptions */
/**@typedef {{id: String,name: String,description: String,icon: String,label: String,type: "ticket"|"role"|"website",color:"red"|"green"|"blue"|"gray"|"none",roles:String[],mode:"add&remove"|"remove"|"add",adminroles: String[],channelprefix: String,category: String,message: String,enableDmOnOpen: Boolean,ticketmessage: String, thumbnail:{enable:Boolean,url:String}, image:{enable:Boolean,url:String}, url:String, closedCategory:{enable:Boolean,id:String}, autoclose:{enable:Boolean,inactiveHours:Number}, readonlyAdminroles: String[]}} OTAllOptions */
//StringOptions
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"adminroles"|"channelprefix"|"category"|"message"|"enableDmOnOpen"|"ticketmessage"|"thumbnail"|"image"|"closedCategory"} OTTicketStringOptions */
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"adminroles"|"channelprefix"|"category"|"message"|"enableDmOnOpen"|"ticketmessage"|"thumbnail"|"image"|"closedCategory"|"adminroles"|"autoclose"} OTTicketStringOptions */
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"color"|"roles"|"mode"|"enableDmOnOpen"} OTRoleStringOptions */
/**@typedef {"id"|"name"|"description"|"icon"|"label"|"type"|"url"} OTWebsiteStringOptions */
+16 -2
View File
@@ -40,11 +40,25 @@ exports.createEmbed = (id) => {
//create the embed
const embed = new discord.EmbedBuilder()
.setTitle(data.name)
if (data.enableFooter) embed.setFooter({text:data.footer})
try {
const footerimg = (data.enableFooter && data.enableFooterImage) ? data.footerImage : undefined
if (data.enableFooter) embed.setFooter({text:data.footer,iconURL:footerimg})
}catch{
bot.errorLog.log("info","FOOTER FAILED TO LOAD, probably invalid url!")
}
try {
if (data.enableThumbnail) embed.setThumbnail(data.thumbnail)
}catch{bot.errorLog.log("info","THUMBNAIL FAILED TO LOAD, probably invalid url!")}
}catch{
bot.errorLog.log("info","THUMBNAIL FAILED TO LOAD, probably invalid url!")
}
try {
if (data.enableImage) embed.setImage(data.image)
}catch{
bot.errorLog.log("info","IMAGE FAILED TO LOAD, probably invalid url!")
}
if (data.enableCustomColor){
embed.setColor(data.color)
+5 -5
View File
@@ -9,8 +9,8 @@
exports.readHiddenData = (messageContent) => {
//ticketdata//type:123|userid:456)
if (!messageContent.includes("[ ](OTDATA|")) return {type:"",data:[],status:false}
const rawhidden = messageContent.split("[ ](OTDATA|")[1]
if (!messageContent.includes("[ ](https://OTDATA|")) return {type:"",data:[],status:false}
const rawhidden = messageContent.split("[ ](https://OTDATA|")[1]
const rawhidden2 = rawhidden.split("//")
const datatype = rawhidden2[0]
@@ -47,7 +47,7 @@ exports.writeHiddenData = (type,data) => {
const datastring = dataValues.join("|")
const result = "[ ](OTDATA|"+type+"//"+datastring+")"
const result = "[ ](https://OTDATA|"+type+"//"+datastring+")"
return result
}
@@ -58,10 +58,10 @@ exports.writeHiddenData = (type,data) => {
* @returns {{description:String,hiddenData:hiddenData}}
*/
exports.removeHiddenData = (description) => {
if (!description.includes("[ ](OTDATA|")) return {description:description,hiddenData:[]}
if (!description.includes("[ ](https://OTDATA|")) return {description:description,hiddenData:[]}
const hiddenData = this.readHiddenData(description)
const splitted = description.split("[ ](OTDATA")
const splitted = description.split("[ ](https://OTDATA")
const original = splitted[0]
return {description:original,hiddenData:hiddenData}
+1 -1
View File
@@ -28,7 +28,7 @@
INFORMATION:
============
Open Ticket v3.3.1 - © DJdj Development
Open Ticket v3.3.3 - © DJdj Development
discord: https://discord.dj-dj.be
website: https://www.dj-dj.be
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "open-ticket",
"version": "3.3.1",
"version": "3.3.3",
"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",
"scripts": {