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
{{ message }}
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.
while it's rather simple it ends up being a bit of boilerplate when extracting multiple components' values, im not sure if theres a need for this for other components, since always have a single value
it should be a trait on ModalInteractionData that simply takes a custom_id and returns an option, this has the limitation of returning a reference so that it doesnt consume it (since it probably has more components)
the trickier bit is consuming the data and returning a [String] so that it can be destructed, it could be collected to a HashMap or struct but former is overhead and latter requires proc macros and for the user to create a struct
while it's rather simple it ends up being a bit of boilerplate when extracting multiple components' values, im not sure if theres a need for this for other components, since always have a single value
it should be a trait on
ModalInteractionData
that simply takes acustom_id
and returns an option, this has the limitation of returning a reference so that it doesnt consume it (since it probably has more components)the trickier bit is consuming the data and returning a
[String]
so that it can be destructed, it could be collected to aHashMap
or struct but former is overhead and latter requires proc macros and for the user to create a structthis can be done using const generics
although this requires that the users provide the
custom_id
s statically, it can be used likeThe text was updated successfully, but these errors were encountered: