Updating to add defer reply
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user