Fixed /close
This commit is contained in:
1 parent
6c5799be0d
commit
9fed504f37
1 file changed
+6
-3
+6
-3
@@ -28,14 +28,17 @@ module.exports = new Command({
|
|||||||
let TicketData = await JSON.parse(
|
let TicketData = await JSON.parse(
|
||||||
fs.readFileSync("./Data/TicketData.json", "utf8")
|
fs.readFileSync("./Data/TicketData.json", "utf8")
|
||||||
).tickets.find((t) => t.id === interaction.channel.id);
|
).tickets.find((t) => t.id === interaction.channel.id);
|
||||||
let tUser = interaction.client.users.cache.get(TicketData.user);
|
if (
|
||||||
if (!interaction.channel.name.startsWith(`${supportbot.TicketPrefix}`)) {
|
!TicketData ||
|
||||||
|
!interaction.channel.name.startsWith(`${supportbot.TicketPrefix}`)
|
||||||
|
) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`${supportbot.NoValidTicket}`)
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
return interaction.reply({ embed: Exists });
|
return interaction.reply({ embeds: [Exists] });
|
||||||
}
|
}
|
||||||
|
let tUser = interaction.client.users.cache.get(TicketData.user);
|
||||||
let transcriptChannel = await interaction.guild.channels.cache.find(
|
let transcriptChannel = await interaction.guild.channels.cache.find(
|
||||||
(channel) =>
|
(channel) =>
|
||||||
channel.name == supportbot.TranscriptLog ||
|
channel.name == supportbot.TranscriptLog ||
|
||||||
|
|||||||
Reference in new issue
Block a user