Skip to content

Commit

Permalink
docs: Add example usage of setup_hook.
Browse files Browse the repository at this point in the history
  • Loading branch information
elenakrittik committed Nov 12, 2023
1 parent 1900902 commit 1daebcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions disnake/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1daebcd

Please sign in to comment.