aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities/calculator.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/utilities/calculator.ts')
-rw-r--r--src/commands/utilities/calculator.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/commands/utilities/calculator.ts b/src/commands/utilities/calculator.ts
index 75d63a1..2204fe6 100644
--- a/src/commands/utilities/calculator.ts
+++ b/src/commands/utilities/calculator.ts
@@ -4,7 +4,6 @@ import {
clientSendAndPermCheck,
colors,
emojis,
- inspectCleanRedactCodeblock,
type CommandMessage,
type SlashMessage
} from '#lib';
@@ -43,7 +42,7 @@ export default class CalculatorCommand extends BushCommand {
const decodedEmbed = new EmbedBuilder().addFields([
{
name: '📥 Input',
- value: await inspectCleanRedactCodeblock(args.expression, 'mma')
+ value: await this.client.utils.inspectCleanRedactCodeblock(args.expression, 'mma')
}
]);
try {
@@ -51,12 +50,19 @@ export default class CalculatorCommand extends BushCommand {
decodedEmbed
.setTitle(`${emojis.successFull} Successfully Calculated Expression`)
.setColor(colors.success)
- .addFields([{ name: '📤 Output', value: await inspectCleanRedactCodeblock(calculated.toString(), 'mma') }]);
+ .addFields([
+ { name: '📤 Output', value: await this.client.utils.inspectCleanRedactCodeblock(calculated.toString(), 'mma') }
+ ]);
} catch (error) {
decodedEmbed
.setTitle(`${emojis.errorFull} Unable to Calculate Expression`)
.setColor(colors.error)
- .addFields([{ name: `📤 Error`, value: await inspectCleanRedactCodeblock(`${error.name}: ${error.message}`, 'js') }]);
+ .addFields([
+ {
+ name: `📤 Error`,
+ value: await this.client.utils.inspectCleanRedactCodeblock(`${error.name}: ${error.message}`, 'js')
+ }
+ ]);
}
return await message.util.reply({ embeds: [decodedEmbed], allowedMentions: AllowedMentions.none() });
}