diff --git a/src/plugins/commands/credits/modules/gift/index.ts b/src/plugins/commands/credits/modules/gift/index.ts index 9161cad..0f36ee9 100644 --- a/src/plugins/commands/credits/modules/gift/index.ts +++ b/src/plugins/commands/credits/modules/gift/index.ts @@ -3,7 +3,7 @@ import { ChatInputCommandInteraction, EmbedBuilder, - SlashCommandSubcommandBuilder, + SlashCommandSubcommandBuilder } from "discord.js"; import mongoose from "mongoose"; // Configurations @@ -200,17 +200,8 @@ export default { } catch (error) { await session.abortTransaction(); session.endSession(); - logger.error(`${error}`); - return interaction.editReply({ - embeds: [ - embed - .setDescription( - "An error occurred while trying to gift credits. Please try again." - ) - .setColor(errorColor), - ], - }); + thorw new Error("An error occurred while trying to gift credits. Please try again later.") } finally { // ending the session session.endSession(); diff --git a/src/plugins/commands/credits/modules/work/index.ts b/src/plugins/commands/credits/modules/work/index.ts index e1fcbc3..d9be719 100644 --- a/src/plugins/commands/credits/modules/work/index.ts +++ b/src/plugins/commands/credits/modules/work/index.ts @@ -56,7 +56,7 @@ export default { userDB.credits += creditsEarned; - await userDB?.save()?.then(async () => { + await userDB?.save()?.then(() => { logger?.silly( `User ${userDB?.userId} worked and earned ${creditsEarned} credits` );