83a05374cf
* New Name, New Version * New default branch name * Migrate to database for long term storage * Fix uncaught call to a promise * Reverse the leaderboard * QoL and Bug fixes * Handle server timeout * Pretty help message
24 lines
756 B
JavaScript
24 lines
756 B
JavaScript
const { SlashCommandBuilder } = require('discord.js');
|
|
const fn = require('../modules/functions.js');
|
|
|
|
module.exports = {
|
|
data: new SlashCommandBuilder()
|
|
.setName('reset')
|
|
.setDescription('Reset all message assignments in your server'),
|
|
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);
|
|
});
|
|
},
|
|
}; |