serenity-rs / poise

Discord bot command framework for serenity, with advanced features like edit tracking and flexible argument parsing
MIT License
597 stars 106 forks source link

Rename modal title when executing from a struct that derives poise::Modal? #268

Closed Stay1444 closed 2 months ago

Stay1444 commented 2 months ago

Using the example to create a modal using a struct like this

#[derive(poise::Modal)]
struct MyModal {
    ...
}

When you execute it the title shown to the user in Discord is the struct name, so MyModal in this case. Is there a way to rename it?

Stay1444 commented 2 months ago

Nevermind, i just found out you can use #[name = "..."].