From c3d3be33d75616d61636de70e6507bdf5537bc14 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Sun, 19 Feb 2023 18:36:42 -0500 Subject: [PATCH] Update reset command --- data/strings.json | 4 +++- slash-commands/reset.js | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/strings.json b/data/strings.json index fe4d980..84b339d 100755 --- a/data/strings.json +++ b/data/strings.json @@ -57,7 +57,9 @@ "missingLeaderboardMessage": "There was a problem finding the Tallest Trees message. Please make sure the ``/tree`` and ``/top trees`` messages are in this channel, or run to set the ``/tree`` and ``/top trees`` channels.", "missingLeaderboardChannel": "There was a problem finding the Tallest Trees channel, was it deleted? Please make sure the ``/tree`` and ``/top trees`` messages are in this channel, or run to set the ``/tree`` and ``/top trees`` channels.", "missingTreeMessage": "There was a problem finding the Tree message. Please make sure the ``/tree`` and ``/top trees`` messages are this channel, or run to set the ``/tree`` and ``/top trees`` channels.", - "missingTreeChannel": "There was a problem finding the Tree channel, was it deleted? Please make sure the ``/tree`` and ``/top trees`` messages are in this channel, or run to set the ``/tree`` and ``/top trees`` channels." + "missingTreeChannel": "There was a problem finding the Tree channel, was it deleted? Please make sure the ``/tree`` and ``/top trees`` messages are in this channel, or run to set the ``/tree`` and ``/top trees`` channels.", + "reset": "All guild configuration information has been removed from the database.", + "resetError": "There was a problem deleting your guild information, contact @voidf1sh#0420 for help." }, "notifications": { "water": "is ready to be watered again!", diff --git a/slash-commands/reset.js b/slash-commands/reset.js index ddc65f1..9744d8e 100755 --- a/slash-commands/reset.js +++ b/slash-commands/reset.js @@ -1,5 +1,6 @@ const { SlashCommandBuilder, PermissionFlagsBits } = require('discord.js'); const fn = require('../modules/functions.js'); +const strings = require('../data/strings.json'); module.exports = { data: new SlashCommandBuilder() @@ -8,13 +9,13 @@ module.exports = { .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 => { + fn.reset(interaction).then(res => { + interaction.editReply(fn.builders.embed(strings.status.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 => { + interaction.editReply(strings.status.resetError).catch(err => { console.error(err); }); });