diff --git a/README.md b/README.md index 9a511f7..7261e15 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ 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.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_
changelog: [click here](https://docs.openticket.dj-dj.be/other/changelog)
documentation: [click here](https://docs.openticket.dj-dj.be/quick-start) diff --git a/commands/change.js b/commands/change.js index 65f18bf..5400e05 100644 --- a/commands/change.js +++ b/commands/change.js @@ -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) diff --git a/config.json b/config.json index 534b484..cbfecd4 100644 --- a/config.json +++ b/config.json @@ -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", diff --git a/core/transcriptSystem/communication/template.json b/core/transcriptSystem/communication/template.json index d003e0d..01870b7 100644 --- a/core/transcriptSystem/communication/template.json +++ b/core/transcriptSystem/communication/template.json @@ -1,6 +1,6 @@ { "version":"1.0.0", - "otversion":"3.2.1", + "otversion":"3.2.2", "style":{ "enableCustomBackground":false, "backgroundModus":"color OR image", diff --git a/language/portuguese.json b/language/portuguese.json index e527b59..015cb02 100644 --- a/language/portuguese.json +++ b/language/portuguese.json @@ -70,18 +70,18 @@ "gettingdeleted":"Ticket está sendo deletado...", "none":"none", - "reason":"reason", + "reason":"Motivo", "deletedby":"deleted by", "closedby":"closed by", - "modalreason":"What is the reason for closing this ticket?", - "chooseATicket": "Choose a ticket" + "modalreason":"Quak o motivo de fechar o ticket?", + "chooseATicket": "Fechar Ticket" }, "transcripts":{ - "title":"Transcript", - "processed":"This transcript is being processed", - "wait":"Please wait!", - "estimated":"Estimated time", - "available":"The transcript is available here" + "title":"Transcrever", + "processed":"A Transcrição está em andamento", + "wait":"Por favor espere!", + "estimated":"Tempo estimado", + "available":"A Transcrição está disponível aqui" } } \ No newline at end of file diff --git a/package.json b/package.json index ef32a39..af73f54 100644 --- a/package.json +++ b/package.json @@ -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": {