fix: flat autocomplete (#395)

* first

* fix
This commit is contained in:
Jacob Nguyen
2025-03-05 21:22:54 -06:00
committed by GitHub
parent aa802f761e
commit 89d7409536
2 changed files with 602 additions and 2 deletions

View File

@@ -33,8 +33,8 @@ export function interactionHandler(deps: UnpackedDependencies, defaultPrefix?: s
// handles autocomplete
if(isAutocomplete(event)) {
const lookupTable = module.locals['@sern/lookup-table'] as Map<string, SernAutocompleteData>
const subCommandGroup = event.options.getSubcommandGroup() ?? "",
subCommand = event.options.getSubcommand() ?? "",
const subCommandGroup = event.options.getSubcommandGroup(false) ?? "",
subCommand = event.options.getSubcommand(false) ?? "",
option = event.options.getFocused(true),
fullPath = path.posix.join("<parent>", subCommandGroup, subCommand, option.name)