Adding apply channel

This commit is contained in:
2023-03-12 16:40:07 +01:00
parent 151498af20
commit c163d44895
3 changed files with 106 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
const { color } = require('../../options.json');
module.exports = {
name: 'guildapplycancel',
description: 'Guild application cancel button.',
type: 'button',
async execute(interaction) {
const user = interaction.user;
const guild = interaction.guild;
const embedColor = Number(color.replace("#", "0x"));
if (interaction.customId === 'guildapplycancel') {
const channel = interaction.channel;
await interaction.reply({ content: 'Application channel will be deleted in 5 seconds', ephemeral: true });
setTimeout(async () => {
await channel.delete();
}, 5000);
}
}
}