aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-03 18:16:11 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-03 18:16:11 -0400
commit3b1311951638bc54efbbb245632e2b3ab460f741 (patch)
tree07fc42ba19a0ec4a2b3168faf96d284f726fb3da /src/commands/utilities
parent4b4d05d9708bdaef2c93df1a83c4ce7ca4350f7a (diff)
downloadtanzanite-3b1311951638bc54efbbb245632e2b3ab460f741.tar.gz
tanzanite-3b1311951638bc54efbbb245632e2b3ab460f741.tar.bz2
tanzanite-3b1311951638bc54efbbb245632e2b3ab460f741.zip
new links, bug fixes, excape rtl charecters in welcome messages
Diffstat (limited to 'src/commands/utilities')
-rw-r--r--src/commands/utilities/wolframAlpha.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/commands/utilities/wolframAlpha.ts b/src/commands/utilities/wolframAlpha.ts
index 69e2ff4..2b64c9c 100644
--- a/src/commands/utilities/wolframAlpha.ts
+++ b/src/commands/utilities/wolframAlpha.ts
@@ -1,5 +1,5 @@
import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage } from '@lib';
-import { MessageEmbed } from 'discord.js';
+import { CommandInteraction, MessageEmbed } from 'discord.js';
// @ts-expect-error: no types :(
import WolframAlphaAPI from 'wolfram-alpha-api';
@@ -39,6 +39,8 @@ export default class WolframAlphaCommand extends BushCommand {
});
}
public override async exec(message: BushMessage | BushSlashMessage, args: { expression: string }): Promise<unknown> {
+ if (message.util.isSlash) await (message.interaction as CommandInteraction).deferReply();
+
const waApi = WolframAlphaAPI(client.config.credentials.wolframAlphaAppId);
const decodedEmbed = new MessageEmbed().addField('📥 Input', await util.inspectCleanRedactCodeblock(args.expression));