core.help

Module Contents

Classes

Help

Class for help command construction.

Attributes

tr

core.help.tr
class core.help.Help(**options)

Class for help command construction.

It inherits from guilded.py’s MinimalHelpCommand and tries to alter only the minimum of its behavior.

The biggest thing it changes is that it uses INI files for text resources, instead of reading docstrings. This allows us to print the help in preferred language of the user or server (e.g. localisation, l10n).

command_not_found(self, string: str) str

Command does not exist.

This override changes the language from english to l10n version.

subcommand_not_found(self, command: guilded.ext.commands.Command, string: str) str

Command does not have requested subcommand.

This override changes the language from english to l10n version.

get_command_signature(self, command: guilded.ext.commands.Command) str

Retrieves the signature portion of the help page.

This override removes command aliases the library function has.

get_opening_note(self) str

Get help information.

This override disables the help information.

get_ending_note(self) str

Get ending note.

This override returns space instead of None.

add_bot_commands_formatting(self, commands: Sequence[Help.add_bot_commands_formatting.commands], heading: str) None

Get list of modules and their commands

This override changes the presentation to bold heading with list of the commands below.

add_aliases_formatting(self, aliases) None

Set formatting for aliases.

This override disables aliases.

add_command_formatting(self, command: guilded.ext.commands.Command) None

Add command.

This override changes the presentation to bold underlined command.

add_subcommand_formatting(self, command: guilded.ext.commands.Command) None

Add subcommand.

This override renders the subcommand as en dash followed by qualified name.

async send_group_help(self, group: guilded.ext.commands.Group) None

Format command group output.

async send_cog_help(self, cog: guilded.ext.commands.Cog) None

Format cog output.

async send_pages(self) None

Send the help.

This override makes sure the content is sent as quotes.

_get_command_translator(self, command: guilded.ext.commands.Command) Optional[Callable]

Get translation function for current command.

_get_cog_translator(self, cog: guilded.ext.commands.Cog) Optional[Callable]

Get translation function for current command.

_get_module_translator(self, module_path: str) Optional[Callable]

Get translation function for module path.

This function is wrapped inside of _get_command_translator() and _get_cog_translator() functions so we can use caching via functools.lru_cache().