serenity icon indicating copy to clipboard operation
serenity copied to clipboard

Add help option to have regular fields instead of inline in generated embeds

Open Zheoni opened this issue 3 years ago • 3 comments

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

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.

Zheoni avatar Apr 10 '21 23:04 Zheoni

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.

Lakelezz avatar Apr 11 '21 09:04 Lakelezz

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! 😄

Zheoni avatar Apr 12 '21 00:04 Zheoni

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!

Lakelezz avatar Apr 12 '21 04:04 Lakelezz

We have deprecated the standard framework and are moving towards poise being the go-to framework instead.

arqunis avatar Jan 25 '24 19:01 arqunis