-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support modal interactions #15
Comments
Hello! Modals are much simpler than commands, I don't think that derive macros are necessary for this (especially since it is complicated to maintain). What do you think about a method similar to |
A parser is really the thing I'm looking for |
A parser is what I would be looking for too. Creating them with a macro would be nice, parsing them with a macro would be amazing. |
modals work with components, why not make it so that it works with components and modals #[derive(ComponentModel, CreateComponent)]
struct MyComponents {
#[component(label = "just the beginning", kind = ComponentType::Button)]
// custom_id is my_component
my_component: Vec<String>, // values, can be anything that impl parse from String, empty for buttons etc
}
// create usage
interaction_client.create_response(.., &Response {
...
}.add_component::<MyComponents>::() // provided by CreateComponent trait
)
// parse usage
MyComponents::from_components(
ComponentInputData::from(message_component_interaction_data)
)? |
Modal support would be really convenient. A basic struct for modals would be great.
The text was updated successfully, but these errors were encountered: