silvanus/slash-commands/reset.js
Skylar Grant dfef35dd95 Confusion
2023-02-19 14:13:03 -05:00

25 lines
843 B
JavaScript
Executable File

const { SlashCommandBuilder, PermissionFlagsBits } = require('discord.js');
const fn = require('../modules/functions.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('reset')
.setDescription('Reset all message assignments in your server')
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
execute(interaction) {
interaction.deferReply({ ephemeral: true }).then(() => {
fn.reset(interaction.guildId).then(res => {
interaction.editReply(fn.builders.embed("Assignments Reset")).catch(err => {
console.error(err);
});
}).catch(err => {
console.error(err);
interaction.editReply("There was a problem deleting your guild information, contact @voidf1sh#0420 for help.").catch(err => {
console.error(err);
});
});
}).catch(err => {
console.error(err);
});
},
};