diff options
Diffstat (limited to 'src/commands/utilities')
-rw-r--r-- | src/commands/utilities/wolframAlpha.ts | 4 |
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)); |