Skip to content

Commit

Permalink
Hijack addendum
Browse files Browse the repository at this point in the history
  • Loading branch information
kangalio committed Dec 22, 2023
1 parent 6c2615f commit 6698629
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/feature_showcase/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub async fn help(ctx: Context<'_>, command: Option<String>) -> Result<(), Error

#[poise::command(slash_command, prefix_command)]
pub async fn pretty_help(ctx: Context<'_>, command: Option<String>) -> Result<(), Error> {
let configuration = poise::builtins::HelpConfiguration {
let configuration = poise::builtins::PrettyHelpConfiguration {
// [configure aspects about the help message here]
..Default::default()
};
Expand Down
13 changes: 13 additions & 0 deletions src/builtins/pretty_help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ pub struct PrettyHelpConfiguration<'a> {
pub __non_exhaustive: (),
}

impl Default for PrettyHelpConfiguration<'_> {
fn default() -> Self {
Self {
extra_text_at_bottom: "",
ephemeral: true,
show_context_menu_commands: false,
show_subcommands: false,
include_description: true,
__non_exhaustive: (),
}
}
}

/// A help command that works similarly to `builtin::help` butt outputs text in an embed.
///
pub async fn pretty_help<U, E>(
Expand Down

0 comments on commit 6698629

Please sign in to comment.