Skip to content

upd: Suggestion edit dialog presence checks - #40

Merged
ebcq merged 2 commits into
cppdiscord:mainfrom
acctress:main
Aug 21, 2026
Merged

upd: Suggestion edit dialog presence checks#40
ebcq merged 2 commits into
cppdiscord:mainfrom
acctress:main

Conversation

@acctress

Copy link
Copy Markdown
Contributor

Added a check and ephemeral message reply for empty event components in the scenario where the suggestion edit dialog is submitted with an empty text field. Refactored std::string v to auto v.

…ents in the scenario where the suggestion edit dialog is submitted with an empty text field. Refactored `std::string v` to `auto v`.

@ebcq ebcq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I tested the changes locally, but with this patch the
Please fill in the suggestion input field reply always appears - even for
valid submissions. Could you take a look?

@acctress acctress left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With further investigation it was discovered that event.components will always hold one or more items, it can never be empty, additionally; the value needed lives at event.components[0].value as a variant. If the user submits an empty field box, the value variant is simply an empty string, so an empty string check is the predicate for the check.

@ebcq
ebcq merged commit ee3f674 into cppdiscord:main Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants