You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which application or package is this feature request for?
discord.js
Feature
Messing around with autocomplete interactions, I've found out that we don't have a nicer way of getting the raw id provided in a previous option when autocompleting outside of doing interaction.options.get(). Unfortunately, we also cannot provide the full methods because Discord doesn't send us resolved data in this interaction type, only the ids.
Ideal solution or implementation
Ideally, we'd provide shortcuts for getting those ids, something like getUserValue or some much better name than what I came up with on the spot!
Alternative solutions or implementations
No response
Other context
newSlashCommandBuilder().setName('example').setDescription('example').addUserOption((user)=>user.setName('user').setDescription('The user to filter autocomplete by').setRequired(true),).addStringOption((id)=>id.setName('autofill-me').setDescription('Value that gets autofilled with data dependent on whatever user has, or nothing is user is not set').setRequired(true).setAutocomplete(true),);
The text was updated successfully, but these errors were encountered:
What about making the second parameter of all these methods an object that has a raw option (and required, of course) to return the payload from the API?
Is this just so the raw value can be correctly typed between string, number and boolean? There's otherwise no benefit to it being a "getUserValue" method as all Snowflakes are strings.
The regular number and boolean methods would work without needing this.
Which application or package is this feature request for?
discord.js
Feature
Messing around with autocomplete interactions, I've found out that we don't have a nicer way of getting the raw id provided in a previous option when autocompleting outside of doing
interaction.options.get()
. Unfortunately, we also cannot provide the full methods because Discord doesn't send us resolved data in this interaction type, only the ids.Ideal solution or implementation
Ideally, we'd provide shortcuts for getting those ids, something like
getUserValue
or some much better name than what I came up with on the spot!Alternative solutions or implementations
No response
Other context
The text was updated successfully, but these errors were encountered: