Skip to content

Commit

Permalink
Fix combo error message
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Dec 25, 2023
1 parent f643ea7 commit 6f25d5c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/discord/commands/global/d.combo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 6f25d5c

Please sign in to comment.