Updating to add defer reply

This commit is contained in:
2023-03-19 13:53:00 +01:00
parent 02ae88ad64
commit c9cc8e4e52
5 changed files with 20 additions and 14 deletions

View File

@@ -8,14 +8,16 @@ module.exports = {
async execute(interaction) {
await interaction.deferReply();
const channel = interaction.channel;
const applicantId = await channel.topic;
await interaction.reply('Application channel will be deleted in 5 seconds');
await interaction.editReply('Application channel will be deleted in 5 seconds');
setTimeout(async () => {
const filePath = path.join(__dirname, `../../applications/${applicantId}`);
const filePath = path.join(__dirname, `../../apps/guild/${applicantId}`);
fs.rmSync(filePath, { force: true });
await channel.delete();