#Autocomplete unknown interaction
1 messages · Page 1 of 1 (latest)
hah
oh
hai
Here is what I have for autocomplete
if (interaction.isAutocomplete() && Command.handleAutocomplete) {
const focused_value = interaction.options.getFocused(true);
const command_option = focused_value.name;
const command_results = await Command.handleAutocomplete(caller, interaction, guildConfig);
const filtered_results = command_results[command_option].filter((choice: string) =>
choice.toLowerCase().includes(focused_value.value.toLowerCase()),
);
if (['host'].includes(Command.definition.name)) {
return await interaction.respond(
filtered_results.slice(0, 24).map((choice: string) => {
const value = choice.toLowerCase().split(' - ');
return { name: choice, value: value.length == 1 ? value[0].replace(/ /g, '_') : value[1].replace(/ /g, '_') };
}),
);
} else
return await interaction.respond(
filtered_results.slice(0, 24).map((choice: string) => ({ name: choice, value: choice.replace(/ /g, '_') })),
);
}
``` and in the `if (['host']` where it returns is where it specifically fails.
this error is annoying
agreed
What’s handleAutocomplete()? Do you do any database retrievals? If so sone sorta caching system seems better
on beta, it works 110% perfectly and does the do exactly how i want, but i finally launch this rewrite live and it's just constant error after error
not on this command
but one second
oh, well it was so big it auto-filed
(yes, this is runescape, give me shit for it later)
Could possibly be that it’s just taking too long
I’m not too sure how to make this “quicker”
what if
You could open a post in #986520997006032896
where it says return await interaction.respond, is return await interaction.defer a thing?
and would that give it more time to do the do?
You can’t defer autocomplete interactions
^^
we've been working on getting this live and migrating information over since 10:30 this morning and it's now almost 7pm
i just want this to work
😭
There’s a lot of splitting etc going on
could that slow it down that much?
and why would it work on beta instance but then not on main?
i had beta in 50+ servers with people spamming it and it was fine, i send it live and just poof
I doubt. Could also get a better host with a better connection
ah
vps should have a better connection ofc
I feel you
All good bro good luck
just as a heads up, i went back and included what was being split off to the options and removed the "host" part of that check where it all runs on that else part and commented out the top part, so far, no issues and it's been up for almost 20 minutes
oop, i didn't mean to reopen this. that's my bad
It’s all good
It’s good lol. Nice work
so i guess it was taking too much time to run through all that little bit of an extra step
and thank you
i'm finished, off to bug hunt another issue, and i already know this one, lol
thanks again k baiii
I got 100’s 💀
wot
lol
