Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interaction response shows choice value instead of name #2363

Closed
Tracked by #2490
th0mk opened this issue Dec 18, 2020 · 4 comments
Closed
Tracked by #2490

Interaction response shows choice value instead of name #2363

th0mk opened this issue Dec 18, 2020 · 4 comments

Comments

@th0mk
Copy link

th0mk commented Dec 18, 2020

Description

When you add a slash command that has an option of type 3 with pre-set choices, the interaction response shows the value of the choice in the interaction response instead of the name.

Steps to Reproduce

Add a command with an option of type 3.

To that option, add a choice where the name is different from the value.

After you've added this command, use it with the option that has a name different from the value.

Make sure you respond with an interaction response that shows the slash command.

Expected Behavior

The interaction response shows the slash command that has been used together with the options. The choice you pick for an option is shown with their name and not their value.

This also allows other users to simply copy and paste the command and use it again.

Current Behavior

The response shows the choices you make for an option with their value instead of their name.

This also means that the command is invalid when copied and used again, since you can't use the value when using a slash command.

Screenshots/Videos

Add a command like this:

image

Use the command:
image

image

The response shows the command with the choice value instead of the name.

image

This means that when you copy and paste the example the time period is invalid:

image

Client and System Information

Canary 73730 (8469559)
Windows 10 64-Bit

@davfsa
Copy link
Contributor

davfsa commented Dec 18, 2020

This should probably go to the bug-hunters discord as this is not really API related. https://discord.gg/discord-testers

@GitSparTV
Copy link

GitSparTV commented Dec 22, 2020

I think it's better to accept both choices name and value. You can type both Half-yearly (last 6 months) and half.

@msciotti
Copy link
Contributor

msciotti commented Mar 3, 2021

Coming back to this after what, funny enough, was a long discussion. Not months long, but long.

This is working as intended, though I also don't like it. That string you're referencing is the raw value being sent to our servers. We would actually have to do some additional fetching of command data on the server to match value back to name and send it to our clients. Closing this for now, but tracking internally.

@msciotti msciotti closed this as completed Mar 3, 2021
@Sylveondev
Copy link

alright boys. This issue is resolved. Discord is working as intended now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants