feat(repo): added help formatters for version numbers to cogs that have them and migrated to using red's inbuilt loggers instead of logging.getLogger
This commit is contained in:
parent
ae31a61436
commit
178a92559c
6 changed files with 62 additions and 30 deletions
|
@ -17,12 +17,22 @@ from redbot.core.utils import chat_formatting, common_filters
|
|||
class Nerdify(commands.Cog):
|
||||
"""Nerdify your text."""
|
||||
|
||||
__author__ = "SeaswimmerTheFsh"
|
||||
__version__ = "1.3.2"
|
||||
__author__ = ["SeaswimmerTheFsh"]
|
||||
__version__ = "1.3.3"
|
||||
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
def format_help_for_context(self, ctx: commands.Context) -> str:
|
||||
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: {chat_formatting.humanize_list(self.__author__)}",
|
||||
]
|
||||
return "\n".join(text)
|
||||
|
||||
@commands.command(aliases=["nerd"])
|
||||
async def nerdify(
|
||||
self, ctx: commands.Context, *, text: Optional[str] = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue