diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 601106a..ae5ea2b 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -9,7 +9,7 @@ from pydactyl import PterodactylClient from redbot.core import app_commands, commands from redbot.core.app_commands import Choice from redbot.core.bot import Red -from redbot.core.utils.chat_formatting import box, error +from redbot.core.utils.chat_formatting import box, error, humanize_list from redbot.core.utils.views import ConfirmView from pterodactyl import mcsrvstatus @@ -20,6 +20,10 @@ from pterodactyl.logger import logger class Pterodactyl(commands.Cog): """Pterodactyl allows you to manage your Pterodactyl Panel from Discord.""" + __author__ = ["SeaswimmerTheFsh"] + __version__ = "2.0.0" + __documentation__ = "https://seacogs.coastalcommits.com/pterodactyl/" + def __init__(self, bot: Red): self.bot = bot self.client: Optional[PterodactylClient] = None @@ -30,6 +34,17 @@ class Pterodactyl(commands.Cog): self.task = self.get_task() self.update_topic.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__)}", + f"Documentation: {self.__documentation__}", + ] + return "\n".join(text) + async def cog_unload(self) -> None: self.update_topic.cancel() self.task.cancel()