Merge branch 'dev' into main
This commit is contained in:
@@ -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">
|
||||
|
||||
[](https://discord.com/invite/26vT9wt3n3) [](https://github.com/DJj123dj/open-ticket/releases/tag/v3.2.1) []() [](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [](https://docs.openticket.dj-dj.be)
|
||||
[](https://discord.com/invite/26vT9wt3n3) [](https://github.com/DJj123dj/open-ticket/releases/tag/v3.2.2) []() [](https://github.com/DJj123dj/open-ticket/blob/main/LICENSE) [](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
@@ -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
@@ -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",
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
"deletedby":"deletado por",
|
||||
"closedby":"fechado por",
|
||||
"modalreason":"Qual o motivo de fechar o ticket?",
|
||||
|
||||
"chooseATicket": "Fechar Ticket"
|
||||
},
|
||||
"transcripts":{
|
||||
|
||||
+1
-1
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user