This commit is contained in:
DJj123dj
2024-01-10 17:11:46 +01:00
parent 07e2a68d06
commit 9d96d11cd3
38 changed files with 191 additions and 122 deletions
+4 -4
View File
@@ -33,13 +33,13 @@ module.exports = () => {
if (!interaction.isChatInputCommand()) return
if (interaction.commandName != "reopen") return
await interaction.deferReply()
const hiddendata = bot.hiddenData.readHiddenData(interaction.channel.id)
if (hiddendata.length < 1) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
if (hiddendata.length < 1) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
const ticketId = hiddendata.find(d => d.key == "type").value
if (hiddendata.find(h => h.key == "pendingdelete")) return interaction.editReply({embeds:[bot.errorLog.warning("Warning!","You can't re-open a ticket while it's being deleted!")]})
if (hiddendata.find(h => h.key == "pendingdelete")) return interaction.reply({embeds:[bot.errorLog.warning("Warning!","You can't re-open a ticket while it's being deleted!")]})
await interaction.deferReply()
await interaction.editReply({embeds:[bot.embeds.commands.reopenEmbed(interaction.user)],components:[bot.buttons.close.openRowNormal]})