v3.3 push 3 (lots of small changes 😄)

This commit is contained in:
DJj123dj
2023-03-13 20:22:23 +01:00
parent ee248e86bc
commit 944032f690
34 changed files with 136 additions and 188 deletions
+5 -5
View File
@@ -47,25 +47,25 @@ module.exports = () => {
})
if (!DISABLE.commands.slash.delete) client.on("interactionCreate",(interaction) => {
if (!DISABLE.commands.slash.delete) client.on("interactionCreate",async (interaction) => {
if (!interaction.isChatInputCommand()) return
if (interaction.commandName != "delete") return
//interaction.deferReply()
if (!interaction.guild) return
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
permsChecker.sendUserNoPerms(interaction.user)
return interaction.reply({embeds:[bot.errorLog.noPermsDelete(interaction.user)]})
}
await interaction.deferReply()
interaction.channel.messages.fetchPinned().then(msglist => {
var firstmsg = msglist.last()
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.editReply({embeds:[bot.errorLog.notInATicket]})
const hiddendata = bot.hiddenData.readHiddenData(firstmsg.embeds[0].description)
const ticketId = hiddendata.data.find(d => d.key == "type").value
interaction.reply({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
interaction.editReply({embeds:[bot.embeds.commands.deleteEmbed(interaction.user)]})
var name = interaction.channel.name
var prefix = ""