v2.1.0 push 2

This commit is contained in:
DJj123dj
2022-06-08 18:07:42 +02:00
parent 62a1f0f8c1
commit 1728c3653a
10 changed files with 113 additions and 78 deletions
+4 -10
View File
@@ -11,10 +11,7 @@ module.exports = () => {
msg.channel.messages.fetchPinned().then(msglist => {
var firstmsg = msglist.last()
if (firstmsg == undefined || firstmsg.author.id != client.user.id){
msg.channel.send({content:"You are not in a ticket!"})
return
}
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
const closebutton = new discord.MessageActionRow()
.addComponents([
@@ -25,7 +22,7 @@ module.exports = () => {
.setEmoji("❌")
])
msg.channel.send({content:"**Click on the button below to delete this ticket!**",components:[closebutton]})
msg.channel.send({embeds:[bot.errorLog.success("Delete this ticket!","You can delete this ticket by clicking on the button below!")],components:[closebutton]})
console.log("[system] deleted a ticket via command")
@@ -41,10 +38,7 @@ module.exports = () => {
interaction.channel.messages.fetchPinned().then(msglist => {
var firstmsg = msglist.last()
if (firstmsg == undefined || firstmsg.author.id != client.user.id){
interaction.reply({content:"You are not in a ticket!"})
return
}
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
const closebutton = new discord.MessageActionRow()
.addComponents([
@@ -55,7 +49,7 @@ module.exports = () => {
.setEmoji("❌")
])
interaction.reply({content:"**Click on the button below to delete this ticket!**",components:[closebutton]})
interaction.reply({embeds:[bot.errorLog.success("Delete this ticket!","You can delete this ticket by clicking on the button below!")],components:[closebutton]})
console.log("[system] deleted a ticket via command")