Merge branch 'dev' into main

This commit is contained in:
Jasper
2023-02-13 20:57:43 +01:00
committed by GitHub
6 changed files with 13 additions and 13 deletions
+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.2.1-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.2.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.2.2-brightgreen.svg?style=flat-square)](https://github.com/DJj123dj/open-ticket/releases/tag/v3.2.2) [![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!
@@ -57,7 +57,7 @@ Translators
|Portuguese |*unknown* |
## links
current version: _v3.2.1_
current version: _v3.2.2_
</br>changelog: [click here](https://docs.openticket.dj-dj.be/other/changelog)
</br>documentation: [click here](https://docs.openticket.dj-dj.be/quick-start)
+7 -8
View File
@@ -21,7 +21,7 @@ module.exports = () => {
return
}
msg.channel.messages.fetchPinned().then(msglist => {
msg.channel.messages.fetchPinned().then(async msglist => {
var firstmsg = msglist.last()
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
@@ -42,9 +42,10 @@ module.exports = () => {
const name = (splitted.length > 0) ? splitted.join("-") : prefix
if (newTicket.category){
const parent = msg.guild.channels.cache.forEach((ch) => (ch.type == discord.ChannelType.GuildCategory) && ch.id == newTicket.category)
if (parent) msg.channel.setParent(parent)
const parent = await msg.guild.channels.fetch(newTicket.category,{cache:true})
if (parent && parent.type == discord.ChannelType.GuildCategory) msg.channel.setParent(parent)
}
msg.channel.setName(newTicket.channelprefix+name)
msg.channel.send({embeds:[bot.embeds.commands.changeEmbed(msg.author,newtype)]})
@@ -52,8 +53,6 @@ module.exports = () => {
log("system","ticket type changed",[{key:"user",value:msg.author.tag},{key:"ticket",value:name},{key:"newtype",value:newtype}])
APIEvents.onCommand("change",permsChecker.command(msg.author.id,msg.guild.id),msg.author,msg.channel,msg.guild,new Date())
})
})
if (!DISABLE.commands.slash.change) client.on("interactionCreate",(interaction) => {
@@ -67,7 +66,7 @@ module.exports = () => {
}
//interaction.deferReply()
interaction.channel.messages.fetchPinned().then(msglist => {
interaction.channel.messages.fetchPinned().then(async msglist => {
var firstmsg = msglist.last()
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
@@ -88,8 +87,8 @@ module.exports = () => {
const name = (splitted.length > 0) ? splitted.join("-") : prefix
if (newTicket.category){
const parent = interaction.guild.channels.cache.forEach((ch) => (ch.type == discord.ChannelType.GuildCategory) && ch.id == newTicket.category)
if (parent) interaction.channel.setParent(parent)
const parent = await interaction.guild.channels.fetch(newTicket.category,{cache:true})
if (parent && parent.type == discord.ChannelType.GuildCategory) interaction.channel.setParent(parent)
}
interaction.channel.setName(newTicket.channelprefix+name)
+1 -1
View File
@@ -89,7 +89,7 @@
"dropdown":false,
"enableFooter":false,
"footer":"Open Ticket v3.2.1 - I'm a footer!",
"footer":"Open Ticket v3.2.2 - I'm a footer!",
"enableThumbnail":false,
"thumbnail":"https://www.example.com/catmemes/cat.png",
@@ -1,6 +1,6 @@
{
"version":"1.0.0",
"otversion":"3.2.1",
"otversion":"3.2.2",
"style":{
"enableCustomBackground":false,
"backgroundModus":"color OR image",
+1
View File
@@ -75,6 +75,7 @@
"deletedby":"deletado por",
"closedby":"fechado por",
"modalreason":"Qual o motivo de fechar o ticket?",
"chooseATicket": "Fechar Ticket"
},
"transcripts":{
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "open-ticket",
"version": "3.2.1",
"version": "3.2.2",
"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": {