core.help¶
Module Contents¶
Attributes¶
- core.help.tr¶
- class core.help.Help(**options)¶
Class for help command construction.
It inherits from guilded.py’s
MinimalHelpCommandand 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.
- 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.
- _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 viafunctools.lru_cache().