Lots of improvements and changes
This commit is contained in:
@@ -36,7 +36,7 @@ module.exports = {
|
||||
|
||||
});
|
||||
|
||||
await ticketChannel.send({ embeds: [createEmbed.basic(`${interaction.user} created a ticket`)]});
|
||||
await ticketChannel.send({ embeds: [createEmbed.basic(`${interaction.user} created a ticket`)] });
|
||||
|
||||
interaction.editReply({ embeds: [createEmbed.basic(`${ticketChannel} has been created`)], emphemeral: true });
|
||||
|
||||
@@ -52,14 +52,14 @@ module.exports = {
|
||||
.setStyle(ButtonStyle.Danger),
|
||||
);
|
||||
|
||||
const closeMessage = await interaction.reply({ embeds: [createEmbed.basic(`Closing ticket in 10 seconds...`)], components: [cancelRow]});
|
||||
const closeMessage = await interaction.reply({ embeds: [createEmbed.basic('Closing ticket in 10 seconds...')], components: [cancelRow] });
|
||||
const collector = closeMessage.createMessageComponentCollector();
|
||||
|
||||
const timeout = setTimeout(() => {
|
||||
|
||||
const timeout = setTimeout(() => {
|
||||
try {
|
||||
interaction.channel.delete()
|
||||
interaction.channel.delete();
|
||||
} catch {}
|
||||
}, 10000)
|
||||
}, 10000);
|
||||
|
||||
collector.on('collect', async () => {
|
||||
clearTimeout(timeout);
|
||||
|
Reference in New Issue
Block a user