diff --git a/commands/check.js b/commands/check.js index ea53645..c030282 100644 --- a/commands/check.js +++ b/commands/check.js @@ -20,6 +20,8 @@ module.exports = { async execute(interaction) { + await interaction.deferReply(); + const ign = interaction.options.getString('ign'); const mojang = "https://api.mojang.com/users/profiles/minecraft/" const slothPixel = "https://api.slothpixel.me/api/players/"; diff --git a/commands/send.js b/commands/send.js index ecfa7a5..a8cd711 100644 --- a/commands/send.js +++ b/commands/send.js @@ -11,16 +11,19 @@ module.exports = { .setDescription('Send a message to a channel.') .addStringOption(option => option - .setName('message') - .setDescription('The message to send.')) + .setName('message') + .setDescription('The message to send.')) .addChannelOption(option => option .setName('channel') .setDescription('The channel to send the message to.')) + .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), - + async execute(interaction) { + await interaction.deferReply(); + const message = interaction.options.getString('message'); const channel = interaction.options.getChannel('channel'); diff --git a/commands/update.js b/commands/update.js index 5b2af30..568eb6d 100644 --- a/commands/update.js +++ b/commands/update.js @@ -21,6 +21,8 @@ module.exports = { .setDMPermission(false), async execute(interaction) { + + await interaction.deferReply(); const verifyData = await verify.findOne({ userID: user.id }) const memberRoles = interaction.member.roles.cache; diff --git a/commands/verify.js b/commands/verify.js index d98ac5b..a2038c0 100644 --- a/commands/verify.js +++ b/commands/verify.js @@ -23,6 +23,8 @@ module.exports = { async execute(interaction) { + await interaction.deferReply(); + const user = interaction.user; const fullUsername = user.username + "#" + user.discriminator const ign = interaction.options.getString('ign'); diff --git a/events/buttons/checkstats.js b/events/buttons/checkstats.js index 834e0c0..4533b94 100644 --- a/events/buttons/checkstats.js +++ b/events/buttons/checkstats.js @@ -10,6 +10,8 @@ module.exports = { type: 'button', async execute(interaction) { + + await interaction.deferReply(); const channel = interaction.channel; const applicantId = await channel.topic diff --git a/events/buttons/guildapplicationaccept.js b/events/buttons/guildapplicationaccept.js index 6a8184d..0fbe8d4 100644 --- a/events/buttons/guildapplicationaccept.js +++ b/events/buttons/guildapplicationaccept.js @@ -8,6 +8,8 @@ module.exports = { async execute(interaction) { + await interaction.deferReply(); + const user = interaction.user; const channel = interaction.channel; const guild = interaction.guild; diff --git a/events/buttons/guildapplycancel.js b/events/buttons/guildapplycancel.js deleted file mode 100644 index c04c4e0..0000000 --- a/events/buttons/guildapplycancel.js +++ /dev/null @@ -1,27 +0,0 @@ -const { color } = require('../../config/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); - - } - - } -} \ No newline at end of file