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
|
@ -19,7 +19,8 @@ from pytimeparse2 import disable_dateutil, parse
|
|||
from redbot.core import app_commands, commands, data_manager
|
||||
from redbot.core.app_commands import Choice
|
||||
from redbot.core.bot import Red
|
||||
from redbot.core.utils.chat_formatting import box, error, warning
|
||||
from redbot.core.utils.chat_formatting import (box, error, humanize_list,
|
||||
warning)
|
||||
|
||||
from aurora.importers.aurora import ImportAuroraView
|
||||
from aurora.importers.galacticbot import ImportGalacticBotView
|
||||
|
@ -46,8 +47,8 @@ class Aurora(commands.Cog):
|
|||
It is heavily inspired by GalacticBot, and is designed to be a more user-friendly alternative to Red's core Mod cogs.
|
||||
This cog stores all of its data in an SQLite database."""
|
||||
|
||||
__author__ = "SeaswimmerTheFsh"
|
||||
__version__ = "2.0.5"
|
||||
__author__ = ["SeaswimmerTheFsh"]
|
||||
__version__ = "2.0.6"
|
||||
|
||||
async def red_delete_data_for_user(self, *, requester, user_id: int):
|
||||
if requester == "discord_deleted_user":
|
||||
|
@ -86,6 +87,16 @@ class Aurora(commands.Cog):
|
|||
disable_dateutil()
|
||||
self.handle_expiry.start()
|
||||
|
||||
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: {humanize_list(self.__author__)}",
|
||||
]
|
||||
return "\n".join(text)
|
||||
|
||||
async def cog_load(self):
|
||||
"""This method prepares the database schema for all of the guilds the bot is currently in."""
|
||||
guilds: list[discord.Guild] = self.bot.guilds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue