fix(pterodactyl): don't run update_topic or the websocket tasks before red is ready
All checks were successful
Actions / Build Documentation (MkDocs) (push) Successful in 39s
Actions / Lint Code (Ruff & Pylint) (push) Successful in 54s

This commit is contained in:
Seaswimmer 2024-04-08 06:24:53 -04:00
parent 0955282325
commit 06e011f670
Signed by: cswimr
GPG key ID: B8953EC01E5C4063
2 changed files with 2 additions and 0 deletions

View file

@ -74,6 +74,7 @@ class Pterodactyl(commands.Cog):
@tasks.loop(minutes=6)
async def update_topic(self):
await self.bot.wait_until_red_ready()
topic = await self.get_topic()
console = self.bot.get_channel(await config.console_channel())
chat = self.bot.get_channel(await config.chat_channel())

View file

@ -15,6 +15,7 @@ from pterodactyl.pterodactyl import Pterodactyl
async def establish_websocket_connection(coginstance: Pterodactyl) -> None:
await coginstance.bot.wait_until_red_ready()
base_url = await config.base_url()
base_url = base_url[:-1] if base_url.endswith('/') else base_url