fix(pterodactyl): register config on cog class initialization

This commit is contained in:
SeaswimmerTheFsh 2024-02-29 23:55:51 -05:00
parent 8387064ab4
commit a4f68d55eb
Signed by untrusted user: 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.utils.chat_formatting import box
from pterodactyl.config import config
from pterodactyl.config import config, register_config
from pterodactyl.logger import logger
@ -21,6 +21,7 @@ class Pterodactyl(commands.Cog):
self.client: Optional[PterodactylClient] = None
self.task: Optional[asyncio.Task] = None
self.websocket: Optional[websockets.WebSocketClientProtocol] = None
register_config(config)
async def cog_load(self) -> None:
self.task = self.get_task()