Handling Unmatched Autocomplete Inputs in Slash Commands

I’m working on a Slash Command that allows users to retrieve crafting instructions for Minecraft items with an autocomplete feature. The bot works like this: a user types /howto followed by the item name, such as "boat", and the bot displays how to craft it

I'm facing an issue where if the user types too quickly, and the autocomplete doesn’t have time to match the input (e.g., /howto boat entered rapidly), the command execution fails because it receives an "undefined" value instead of "boat"

Is there a way to modify the bot so it can default to using the raw input string from the user when the autocomplete fails to provide a match? I want to ensure the command remains valid and executes with the user’s input regardless of the autocomplete's speed
Was this page helpful?