diff --git a/src/jobs/shop/modules/roles/components/overDueForPayment.ts b/src/jobs/shop/modules/roles/components/overDueForPayment.ts index 49b9c85..3a834d8 100644 --- a/src/jobs/shop/modules/roles/components/overDueForPayment.ts +++ b/src/jobs/shop/modules/roles/components/overDueForPayment.ts @@ -51,11 +51,8 @@ export const execute = async (client: Client, role: IShopRole) => { ); }); }) - .catch(async (err) => { - throw new Error( - `Error removing role ${roleId} from user ${userId}.`, - err - ); + .catch(() => { + throw new Error(`Failed removing role from user.`); }); throw new Error("User does not have enough credits."); @@ -70,16 +67,16 @@ export const execute = async (client: Client, role: IShopRole) => { role.lastPayed = new Date(); await role .save() - .then(async () => { + .then(() => { logger.silly(`Shop role ${roleId} has been updated.`); }) - .catch(async (err) => { - throw new Error(`Error updating shop role ${roleId}.`, err); + .catch(() => { + throw new Error("Failed updating shop role."); }); logger.debug(`Shop role ${roleId} has been paid.`); }) - .catch(async (err) => { - throw new Error(`Error updating user ${userId}.`, err); + .catch(() => { + throw new Error("Failed updating user."); }); }; diff --git a/src/jobs/timeouts/index.ts b/src/jobs/timeouts/index.ts index 9684a7c..d0de4a1 100644 --- a/src/jobs/timeouts/index.ts +++ b/src/jobs/timeouts/index.ts @@ -24,7 +24,7 @@ export const execute = async () => { timeoutId, cooldown, }) - .then(async () => { + .then(() => { logger.debug( `Timeout document ${timeoutId} has been deleted from user ${userId}.` ); diff --git a/src/plugins/commands/config/modules/audits/index.ts b/src/plugins/commands/config/modules/audits/index.ts index c8de0ad..1605ed9 100644 --- a/src/plugins/commands/config/modules/audits/index.ts +++ b/src/plugins/commands/config/modules/audits/index.ts @@ -78,9 +78,10 @@ export default { text: footerText, }); - return interaction.editReply({ + await interaction.editReply({ embeds: [embedSuccess], }); + return; }); }, }; diff --git a/src/plugins/commands/config/modules/cpgg/index.ts b/src/plugins/commands/config/modules/cpgg/index.ts index a4297ad..1f640ab 100644 --- a/src/plugins/commands/config/modules/cpgg/index.ts +++ b/src/plugins/commands/config/modules/cpgg/index.ts @@ -80,9 +80,10 @@ export default { text: footerText, }); - return interaction?.editReply({ + await interaction?.editReply({ embeds: [interactionEmbed], }); + return; }); }, }; diff --git a/src/plugins/commands/config/modules/credits/index.ts b/src/plugins/commands/config/modules/credits/index.ts index 436d26f..1f65b88 100644 --- a/src/plugins/commands/config/modules/credits/index.ts +++ b/src/plugins/commands/config/modules/credits/index.ts @@ -126,9 +126,10 @@ export default { text: footerText, }); - return interaction?.editReply({ + await interaction?.editReply({ embeds: [interactionEmbed], }); + return; }); }, }; diff --git a/src/plugins/commands/config/modules/embeds/index.ts b/src/plugins/commands/config/modules/embeds/index.ts index 3e667c6..6835f0a 100644 --- a/src/plugins/commands/config/modules/embeds/index.ts +++ b/src/plugins/commands/config/modules/embeds/index.ts @@ -86,9 +86,10 @@ export default { }, ]); - return interaction.editReply({ + await interaction.editReply({ embeds: [embed], }); + return; }); }, }; diff --git a/src/plugins/commands/config/modules/points/index.ts b/src/plugins/commands/config/modules/points/index.ts index 7e1c6dc..03f30ec 100644 --- a/src/plugins/commands/config/modules/points/index.ts +++ b/src/plugins/commands/config/modules/points/index.ts @@ -98,9 +98,10 @@ export default { text: footerText, }); - return interaction?.editReply({ + await interaction?.editReply({ embeds: [interactionEmbed], }); + return; }); }, }; diff --git a/src/plugins/commands/config/modules/shop/index.ts b/src/plugins/commands/config/modules/shop/index.ts index 8a6ceb7..0b0b9e7 100644 --- a/src/plugins/commands/config/modules/shop/index.ts +++ b/src/plugins/commands/config/modules/shop/index.ts @@ -79,9 +79,10 @@ export default { text: footerText, }); - return interaction?.editReply({ + await interaction?.editReply({ embeds: [interactionEmbed], }); + return; }); }, }; diff --git a/src/plugins/commands/config/modules/welcome/index.ts b/src/plugins/commands/config/modules/welcome/index.ts index 61a9436..585c861 100644 --- a/src/plugins/commands/config/modules/welcome/index.ts +++ b/src/plugins/commands/config/modules/welcome/index.ts @@ -171,9 +171,10 @@ export default { text: footerText, }); - return interaction?.editReply({ + await interaction?.editReply({ embeds: [interactionEmbed], }); + return; }); }, }; diff --git a/src/plugins/commands/reputation/modules/give/index.ts b/src/plugins/commands/reputation/modules/give/index.ts index 44f0155..41b8c34 100644 --- a/src/plugins/commands/reputation/modules/give/index.ts +++ b/src/plugins/commands/reputation/modules/give/index.ts @@ -49,7 +49,7 @@ export default { if (!userObj) throw new Error("User is undefined"); // Pre-checks - await noSelfReputation(optionTarget, user); + noSelfReputation(optionTarget, user); // Check if user is on cooldown otherwise create one await cooldown.command(interaction, process.env.REPUTATION_TIMEOUT);