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

Discord autocomplete allows bypassing developer defined values when creating/switching channels #7206

Open
SatisfyAi opened this issue Oct 11, 2024 · 3 comments
Labels
bug slash commands synced Synced to internal tracker

Comments

@SatisfyAi
Copy link

SatisfyAi commented Oct 11, 2024

Description

When using a slash command with an autocomplete option, if a user starts typing and selects an option, but then switches channels or creates a new channel before sending the command, the selected autocomplete value becomes invalid. Instead of sending the expected value to the bot, the command sends the name of the option instead of the value, causing the command to fail.

Steps to Reproduce

  1. Begin typing a slash command that includes autocomplete options.
  2. Select one of the provided autocomplete values.
  3. Switch to a different channel or create a new channel.
  4. Return to the original channel and attempt to send the command.

Expected Behavior

Although the selected autocomplete value appears to remain selected after switching channels or creating a new one, the command sends the name rather than its actual value, causing the command to break.

Current Behavior

The autocomplete value stays selected however instead of sending the value to the bot it sends the name of the option instead, which breaks the command.

Screenshots/Videos

The attached video shows what happens when:

  1. Channel is switched
  2. Command is ran normally
  3. Channel is created
9FuwwtbXfS.mp4

Client and System Information

stable 334959 (b559238)
Windows 10 64-bit (10.0.19045)

@almostSouji
Copy link

as far as i am aware, autocomplete is not meant to act like choices and specifically allows non-matches to be sent as-is
i know some bots that use this as a "suggest common reasons, but allow custom reasons as well", for example

@advaith1
Copy link
Contributor

Autocomplete does allow custom inputs, but if the user selects an option provided by the bot, it should always submit the value instead of the name.

@SatisfyAi
Copy link
Author

Yeah the issue is with the autocomplete options provided by the bot, as those fail during the channel switch.

@infinitestory infinitestory added the synced Synced to internal tracker label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug slash commands synced Synced to internal tracker
Projects
None yet
Development

No branches or pull requests

4 participants