#autocomplete choices not being shown

26 messages · Page 1 of 1 (latest)

dim gull
#

Having issue with autocomplete.

half auroraBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

native sonnet
#

only 25 choices can be shown at a time so you need to slice the array

dim gull
#

I've seen some bots have over 25 choices in a command, it doesn't show all options at once but if you search it. It appears.

#

thats what im trying to do

native sonnet
#

thats because it's filtered

dim gull
#

some options show but not all are showing

native sonnet
#

but no more than 25 choices can be shown

dim gull
#

yeah unless the user types

native sonnet
#

you can do filtered.map(...).slice(0, 25)

dim gull
#

still not giving me all the options in the array

native sonnet
#

it will only show 25 at a time

#

you can't have it show 100 at a time

#

that's just discord's limit

#

you can have 100 choices behind the curtain, but still only 25 can be shown

dim gull
#

i mean its not even giving the option to show even 25, and when i try searching something in the array it doesnt show anything

native sonnet
#

did you redeploy your command after setting .setAutocomplete(true) ?

dim gull
#

yes

native sonnet
#

where do you call execute ?

dim gull
#

is it cause it's not in async autocomplete(interaction)

native sonnet
#

yes

#

and you need to make your interactionCreate handle that function under the isAutoComplete() typeguard

#

autocomplete choices not being shown

native sonnet
dim gull
#

ok

#

works now thanks again for the help 🙂