Added deferreply to lessen the bugs.
This commit is contained in:
@@ -20,6 +20,8 @@ module.exports = {
|
|||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
const ign = interaction.options.getString('ign');
|
const ign = interaction.options.getString('ign');
|
||||||
const mojang = "https://api.mojang.com/users/profiles/minecraft/"
|
const mojang = "https://api.mojang.com/users/profiles/minecraft/"
|
||||||
const slothPixel = "https://api.slothpixel.me/api/players/";
|
const slothPixel = "https://api.slothpixel.me/api/players/";
|
||||||
|
|||||||
@@ -17,10 +17,13 @@ module.exports = {
|
|||||||
option
|
option
|
||||||
.setName('channel')
|
.setName('channel')
|
||||||
.setDescription('The channel to send the message to.'))
|
.setDescription('The channel to send the message to.'))
|
||||||
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
const message = interaction.options.getString('message');
|
const message = interaction.options.getString('message');
|
||||||
const channel = interaction.options.getChannel('channel');
|
const channel = interaction.options.getChannel('channel');
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ module.exports = {
|
|||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
const verifyData = await verify.findOne({ userID: user.id })
|
const verifyData = await verify.findOne({ userID: user.id })
|
||||||
const memberRoles = interaction.member.roles.cache;
|
const memberRoles = interaction.member.roles.cache;
|
||||||
const roleManage = interaction.member.roles;
|
const roleManage = interaction.member.roles;
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ module.exports = {
|
|||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
const user = interaction.user;
|
const user = interaction.user;
|
||||||
const fullUsername = user.username + "#" + user.discriminator
|
const fullUsername = user.username + "#" + user.discriminator
|
||||||
const ign = interaction.options.getString('ign');
|
const ign = interaction.options.getString('ign');
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ module.exports = {
|
|||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
const channel = interaction.channel;
|
const channel = interaction.channel;
|
||||||
const applicantId = await channel.topic
|
const applicantId = await channel.topic
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ module.exports = {
|
|||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
await interaction.deferReply();
|
||||||
|
|
||||||
const user = interaction.user;
|
const user = interaction.user;
|
||||||
const channel = interaction.channel;
|
const channel = interaction.channel;
|
||||||
const guild = interaction.guild;
|
const guild = interaction.guild;
|
||||||
|
|||||||
@@ -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);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user