serenity
serenity copied to clipboard
Add help option to have regular fields instead of inline in generated embeds
For the single command help embeds. For example: I have several long examples, and the fact that fields are always inline makes the resulting embed look bad.
![Captura de pantalla 2021-04-11 a las 0 43 51](https://user-images.githubusercontent.com/38019254/114286444-0fa56400-9a5f-11eb-9d65-b08aaf004157.png)
In the embed generation, the fields are ALWAYS inline (this is for the examples, but is the same for every other information): https://github.com/serenity-rs/serenity/blob/392a534980dda1706dcd519550fc58306101d8e8/src/framework/standard/help_commands.rs#L1187
Maybe some new options allowing to modify the the embed generation would be nice. For example in the help macro something like
#[help]
#[examples_style = "regular"]
async fn my_help(...) {...}
or (the now default)
#[examples_style = "inline"]
This can also apply to usage, the group, aliases, where it's available, checks and sub-commands.
And then depending on this option, modify the field creation.
Hello, Zheoni. This is a good idea but this suggested implementation fails in one aspect. The actual attributes do not describe the kind of help-system, therefore, suggesting inline as style will yield no impact when the user uses the plain help.
On another note, I'm working on a new help-system, more power to the embed-style is important. For now, I suggest you to simply implement your own help-embed function which is as is easy as copying and changing inline where needed.
Ok thanks, I will implement it that way and keep an eye on the new help system.
Thanks for your attention and for the great work all of you are doing with serenity. I recently discovered it and it's very good! 😄
One approach could be a custom setting for the embed functions. Since the help-command (marked by the attribute) calls the help-implementation (embed or plain), passing an argument would be valid. This argument could be named inlined or be a setting struct to adjust inline for each embed field; despite this may being too much and creating an inconsistent look.
The problem here is the API change, one would have to deprecate the old embed-function and make a new one.
Either way, we will keep this issue open until it's added.
Thanks for bringing it up!
We have deprecated the standard framework and are moving towards poise being the go-to framework instead.