Skip to content

Commit bca121e

Browse files
authored
fix: correctly unpack startup tasks in AutoShardClient (#1688)
1 parent fecf3d3 commit bca121e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

interactions/client/auto_shard_client.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ async def _on_websocket_ready(self, event: events.RawGatewayEvent) -> None:
173173
# run any pending startup tasks
174174
if self.async_startup_tasks:
175175
try:
176-
await asyncio.gather(*self.async_startup_tasks)
176+
await asyncio.gather(
177+
*[
178+
task[0](*task[1] if len(task) > 1 else [], **task[2] if len(task) == 3 else {})
179+
for task in self.async_startup_tasks
180+
]
181+
)
177182
except Exception as e:
178183
self.dispatch(events.Error(source="async-extension-loader", error=e))
179184

0 commit comments

Comments
 (0)