Skip to content

Commit

Permalink
fix: ignore unknown cmds (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnh12 authored Jun 27, 2024
1 parent 95bd8d8 commit 2497186
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/ui/discord/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,7 @@ export async function getCommandSuggestion(
const results = fuzzySet.get(userInput, null, 0.5)

if (!results || results.length == 0) {
return {
author: ["Mochi is confused", getEmojiURL(emojis.MOCHI_CIRCLE)],
description: `Mochi doesn't understand what command you are trying to use.\n${getEmoji(
"ANIMATED_POINTING_RIGHT",
)} Perhaps you can reference \`${PREFIX}help\` for more info`,
}
return null
} else {
const result = results[0][1]
const cmd = commands[result]
Expand Down

0 comments on commit 2497186

Please sign in to comment.