feat(repo): updated all cogs (except aurora) to use the help formatting present in the indev version of aurora
This commit is contained in:
parent
eb331faf55
commit
2c7b0f5441
7 changed files with 68 additions and 39 deletions
|
@ -38,22 +38,26 @@ def format_rfc_text(text: str, number: int) -> str:
|
|||
class SeaUtils(commands.Cog):
|
||||
"""A collection of random utilities."""
|
||||
|
||||
__author__ = ["SeaswimmerTheFsh"]
|
||||
__version__ = "1.0.0"
|
||||
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
|
||||
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
||||
__version__ = "1.0.1"
|
||||
__documentation__ = "https://seacogs.coastalcommits.com/seautils/"
|
||||
|
||||
def __init__(self, bot: Red) -> None:
|
||||
self.bot = bot
|
||||
|
||||
def format_help_for_context(self, ctx: commands.Context) -> str:
|
||||
pre_processed = super().format_help_for_context(ctx=ctx) or ""
|
||||
pre_processed = super().format_help_for_context(ctx) or ""
|
||||
n = "\n" if "\n\n" not in pre_processed else ""
|
||||
text = [
|
||||
f"{pre_processed}{n}",
|
||||
f"Cog Version: **{self.__version__}**",
|
||||
f"Author: {cf.humanize_list(items=self.__author__)}"
|
||||
f"{cf.bold('Cog Version:')} [{self.__version__}]({self.__git__})",
|
||||
f"{cf.bold('Author:')} {cf.humanize_list(self.__author__)}",
|
||||
f"{cf.bold('Documentation:')} {self.__documentation__}",
|
||||
]
|
||||
return "\n".join(text)
|
||||
|
||||
|
||||
def format_src(self, obj: Any) -> str:
|
||||
"""A large portion of this code is repurposed from Zephyrkul's RTFS cog.
|
||||
https://github.com/Zephyrkul/FluffyCogs/blob/master/rtfs/rtfs.py"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue