Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
fix: only run async_load once (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
LordOfPolls authored Oct 28, 2022
1 parent 8ee8d1b commit 016564d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions naff/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,13 +835,6 @@ async def _on_websocket_ready(self, event: events.RawGatewayEvent) -> None:
self.logger.debug(f"Waiting for {guild.id} to chunk")
await guild.chunked.wait()

# run any pending startup tasks
if self.async_startup_tasks:
try:
await asyncio.gather(*self.async_startup_tasks)
except Exception as e:
self.dispatch(events.Error(source="async-extension-loader", error=e))

# cache slash commands
if not self._startup:
await self._init_interactions()
Expand Down Expand Up @@ -914,8 +907,7 @@ async def astart(self, token: str) -> None:
try:
await asyncio.gather(*self.async_startup_tasks)
except Exception as e:
self.dispatch(events.Error("async-extension-loader", e))

self.dispatch(events.Error(source="async-extension-loader", error=e))
try:
await self._connection_state.start()
finally:
Expand Down

0 comments on commit 016564d

Please sign in to comment.