fix(pterodactyl): register config on cog class initialization
Some checks failed
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 18s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 20s

This commit is contained in:
Seaswimmer 2024-02-29 23:55:51 -05:00
parent 8387064ab4
commit a4f68d55eb
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -9,7 +9,7 @@ from redbot.core import commands
from redbot.core.bot import Red from redbot.core.bot import Red
from redbot.core.utils.chat_formatting import box from redbot.core.utils.chat_formatting import box
from pterodactyl.config import config from pterodactyl.config import config, register_config
from pterodactyl.logger import logger from pterodactyl.logger import logger
@ -21,6 +21,7 @@ class Pterodactyl(commands.Cog):
self.client: Optional[PterodactylClient] = None self.client: Optional[PterodactylClient] = None
self.task: Optional[asyncio.Task] = None self.task: Optional[asyncio.Task] = None
self.websocket: Optional[websockets.WebSocketClientProtocol] = None self.websocket: Optional[websockets.WebSocketClientProtocol] = None
register_config(config)
async def cog_load(self) -> None: async def cog_load(self) -> None:
self.task = self.get_task() self.task = self.get_task()