renderer ¶
Help system embed rendering.
Classes:
-
HelpRenderer–Handles help embed creation and formatting.
Classes¶
HelpRenderer ¶
HelpRenderer(prefix: str)
Handles help embed creation and formatting.
Initialize the help renderer.
Parameters:
-
prefix(str) –The command prefix to use in help text formatting.
Methods:
-
create_base_embed–Create base embed with consistent styling.
-
format_flag_details–Format flag details for a command.
-
generate_default_usage–Generate default usage string for a command.
-
add_command_help_fields–Add help fields for a command to embed.
-
add_command_field–Add a single command field to embed.
-
create_main_embed–Create main help embed.
-
create_category_embed–Create category-specific embed.
-
create_command_embed–Create command-specific embed.
-
create_subcommand_embed–Create subcommand-specific embed.
-
create_category_options–Create select options for categories.
-
create_command_options–Create select options for commands.
-
create_subcommand_options–Create select options for subcommands.
Functions¶
create_base_embed ¶
Create base embed with consistent styling.
Returns:
-
Embed–The base embed with title, description, and default color.
format_flag_details ¶
Format flag details for a command.
Returns:
-
str–Formatted flag details, or empty string if no flags.
_format_flag_name staticmethod ¶
Format a flag name based on its properties.
Returns:
-
str–The formatted flag name with appropriate brackets.
generate_default_usage ¶
add_command_help_fields async ¶
Add help fields for a command to embed.
add_command_field ¶
Add a single command field to embed.
create_main_embed async ¶
Create main help embed.
Returns:
-
Embed–The main help embed with bot information and usage instructions.
_add_bot_help_fields async ¶
_add_bot_help_fields(embed: Embed) -> None
Add additional help information about the bot to the embed.
create_category_embed async ¶
create_command_embed async ¶
create_subcommand_embed async ¶
create_category_options ¶
Create select options for categories.
Returns:
-
list[SelectOption]–List of select options for each category.
create_command_options ¶
create_command_options(
commands_dict: dict[str, str], command_mapping: dict[str, Command[Any, Any, Any]]
) -> list[SelectOption]
Create select options for commands.
Returns:
-
list[SelectOption]–List of select options for each command, sorted by label.
create_subcommand_options ¶
Create select options for subcommands.
Returns:
-
list[SelectOption]–List of select options for each subcommand.