-
Notifications
You must be signed in to change notification settings - Fork 47
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
Re-type IMessageComponentData.cs#Values as a union array of snowflakes or strings #277
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Need to be cautious with unsigned number only options that would cause a IReadOnlyList<Snowflake>
even for StringSelect
component.
Remora.Discord.Interactivity/Responders/InteractivityResponder.cs
Outdated
Show resolved
Hide resolved
Remora.Discord.Interactivity/Responders/InteractivityResponder.cs
Outdated
Show resolved
Hide resolved
Looks like a fine way to handle it. Please add variant test data for snowflake-typed value lists as well. |
Are there any updates on this PR? |
Hiya @Nihlus, no sorry. Discord's response to my docs PR seemed to indicate I hadn't conveyed my request well, and owing to various things at the time I didn't respond. I could go for round two on the Discord docs, or we could leave things as-is (deserialising to a string) given the indeterminacy of this case, or we could follow Discord's comment that the data type should always match the type of the select menu and proceed with this implementation - happy to follow your call here 🙂. |
This has been on the backburner for a while now - I'm happy to go with this implementation. |
Alright. I'll double-check that this implementation is still accurate later today, and mark as ready-for-review. |
Testing against Discord indicates this is still accurate 👍 |
Following discussion in discord/discord-api-docs#5823, my assumption in #275 appears to be incorrect, and the underlying type of the
values
field depends on the type of select menu used. This PR resolves that; however, given the current implementation works, I would like to leave this as a draft until the API docs PR is resolved with hopefully a final answer.