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
The value of an autocomplete interaction is dynamic and may be a number. However, this is incorrect. The value of an autocomplete interaction is always a string.
Code sample
declareconstinteraction: APIApplicationCommandAutocompleteInteraction;if(interaction.data.options[0]?.type===ApplicationCommandOptionType.String){const{ value }=interaction.data.options[0];// String. Correct.}if(interaction.data.options[0]?.type===ApplicationCommandOptionType.Integer){const{ value }=interaction.data.options[0];// Number. Incorrect.}if(interaction.data.options[0]?.type===ApplicationCommandOptionType.Number){const{ value }=interaction.data.options[0];// Number. Incorrect.}
Package version
main
Runtime
Node.js
Runtime version
N/A
Priority this issue should have
Medium (should be fixed soon)
The text was updated successfully, but these errors were encountered:
Issue description
The value of an autocomplete interaction is dynamic and may be a number. However, this is incorrect. The value of an autocomplete interaction is always a
string
.Code sample
Package version
main
Runtime
Node.js
Runtime version
N/A
Priority this issue should have
Medium (should be fixed soon)
The text was updated successfully, but these errors were encountered: