From 3b1311951638bc54efbbb245632e2b3ab460f741 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 3 Oct 2021 18:16:11 -0400 Subject: new links, bug fixes, excape rtl charecters in welcome messages --- src/commands/utilities/wolframAlpha.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/commands/utilities') 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 { + 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)); -- cgit