From 6f25d5cf138baa0dc2654de1eaa87f0434348eb2 Mon Sep 17 00:00:00 2001 From: LunaUrsa <1836049+LunaUrsa@users.noreply.github.com> Date: Mon, 25 Dec 2023 09:40:03 -0600 Subject: [PATCH] Fix combo error message --- src/discord/commands/global/d.combo.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/discord/commands/global/d.combo.ts b/src/discord/commands/global/d.combo.ts index d3930a20a..127a16f68 100644 --- a/src/discord/commands/global/d.combo.ts +++ b/src/discord/commands/global/d.combo.ts @@ -2,6 +2,7 @@ import { SlashCommandBuilder, Colors, } from 'discord.js'; +import { stripIndents } from 'common-tags'; import { SlashCommand } from '../../@types/commandDef'; import { embedTemplate } from '../../utils/embedTemplate'; import { combo } from '../../../global/commands/g.combo'; @@ -37,11 +38,19 @@ export const dCombo: SlashCommand = { msg: string; options?: string[]; }).err) { - await interaction.editReply((results as { + const errorResults = results as { err: boolean; msg: string; options?: string[]; - }).msg); + }; + if (errorResults.msg.includes('not found')) { + await interaction.editReply(stripIndents`${drugA} and ${drugB} have no known interactions! + + This does not mean combining them is safe: this means we don't have information on it!`); + return false; + } + + await interaction.editReply(errorResults.msg); return false; }