discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.38k stars 3.97k forks source link

Allowing a higher form body for auto completions #10363

Closed dev-syn closed 4 months ago

dev-syn commented 4 months ago

Which application or package is this feature request for?

discord.js

Feature

I would like to request that the form body for auto completions be increased to 30 choices. I desired to create the ability to specify a book category in my specific example the Old Testament and the New Testament of the Bible, I then discovered that there are limits to the amount of options, that you can provide for auto completions. I understand this isn't a direct issue of Discord.js but I would like to implement this practically.

I am aware of a workaround by perhaps doing Old Testament 1 and Old Testament 2 as well as the counterpart.

I even now, notice that the Old Testament contains 40 books while the New Testament contains 27. This number is even greater than my request and I understand the limits put in place even so, I wonder if there could be benefits for developers who have Nitro could we be granted higher limits?

In circumstances in which you imagine 30-40 choices, it may seem ridiculous but in my case, I filter the results based on what has been typed which will riddle it down significantly.

Lastly, I understand this is a very niche example and not a critical feature but having higher limits could solve many cases similarly. I figured it wouldn't hurt to ask.

Ideal solution or implementation

That the limit of auto-completion form body choices could be increased.

Alternative solutions or implementations

No response

Other context

No response

didinele commented 4 months ago

We cannot do anything about this, you need to address this feature request to Discord themselves.

dev-syn commented 4 months ago

We cannot do anything about this, you need to address this feature request to Discord themselves.

Okay, I will do that thank you for your response.

monbrey commented 4 months ago

As an additional note, this goes against the very design of autocomplete. The purpose of the feature is not to show a huge number of options, but to reduce the number by filtering based on the content the user is typing into the option, narrowing down the search result.

dev-syn commented 4 months ago

As an additional note, this goes against the very design of autocomplete. The purpose of the feature is not to show a huge number of options, but to reduce the number by filtering based on the content the user is typing into the option, narrowing down the search result.

I see your point but for my use case I desire to dynamically give different results based on input from the user and I can't do that with static choices that I'm aware of.

monbrey commented 4 months ago

I never said to use static choices. I said to use autocomplete with less options. Use your dynamic filtering to reduce the number to much less than 30.

dev-syn commented 4 months ago

I never said to use static choices. I said to use autocomplete with less options. Use your dynamic filtering to reduce the number to much less than 30.

I was doing a comparison of my two options. You are correct that I could filter it down but I need actual input from the user before I can begin filtering.

I suppose I can intentionally only allow 25 choices that show initially until a user inputs text for a book they wish to view. In my case, I desired to show all book options and then would be filtered down but I see the limitations in place.

Thanks for your comments, now on to fixing my issue.