fix(pterodactyl): don't run update_topic or the websocket tasks before red is ready
This commit is contained in:
parent
0955282325
commit
06e011f670
2 changed files with 2 additions and 0 deletions
|
@ -74,6 +74,7 @@ class Pterodactyl(commands.Cog):
|
||||||
|
|
||||||
@tasks.loop(minutes=6)
|
@tasks.loop(minutes=6)
|
||||||
async def update_topic(self):
|
async def update_topic(self):
|
||||||
|
await self.bot.wait_until_red_ready()
|
||||||
topic = await self.get_topic()
|
topic = await self.get_topic()
|
||||||
console = self.bot.get_channel(await config.console_channel())
|
console = self.bot.get_channel(await config.console_channel())
|
||||||
chat = self.bot.get_channel(await config.chat_channel())
|
chat = self.bot.get_channel(await config.chat_channel())
|
||||||
|
|
|
@ -15,6 +15,7 @@ from pterodactyl.pterodactyl import Pterodactyl
|
||||||
|
|
||||||
|
|
||||||
async def establish_websocket_connection(coginstance: Pterodactyl) -> None:
|
async def establish_websocket_connection(coginstance: Pterodactyl) -> None:
|
||||||
|
await coginstance.bot.wait_until_red_ready()
|
||||||
base_url = await config.base_url()
|
base_url = await config.base_url()
|
||||||
base_url = base_url[:-1] if base_url.endswith('/') else base_url
|
base_url = base_url[:-1] if base_url.endswith('/') else base_url
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue