From 1daebcd63fac6ebfd280bf84614e0bf53aa5b6eb Mon Sep 17 00:00:00 2001 From: elenakrittik Date: Sun, 12 Nov 2023 21:11:55 +0300 Subject: [PATCH] docs: Add example usage of setup_hook. --- disnake/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/disnake/client.py b/disnake/client.py index d3da16345f..ee6cf07c47 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -979,8 +979,8 @@ async def before_identify_hook(self, shard_id: Optional[int], *, initial: bool = async def setup_hook(self) -> None: """A hook that allows you to perform asynchronous setup like - initiating database connections after the bot is logged in but - before it has connected to the websocket. + initiating database connections or loading cogs/extensions after + the bot is logged in but before it has connected to the websocket. This is only called once, in :meth:`.login`, before any events are dispatched, making it a better solution than doing such setup in