|async_context_manager| :meth:`initializes ` the Bot. Returns: The initialized Bot instance. Raises: :exc:`Exception`: If an exception is raised during initialization, :meth:`shutdown` is called in this case.
(self: BT)
| 402 | self._freeze() |
| 403 | |
| 404 | async def __aenter__(self: BT) -> BT: |
| 405 | """ |
| 406 | |async_context_manager| :meth:`initializes <initialize>` the Bot. |
| 407 | |
| 408 | Returns: |
| 409 | The initialized Bot instance. |
| 410 | |
| 411 | Raises: |
| 412 | :exc:`Exception`: If an exception is raised during initialization, :meth:`shutdown` |
| 413 | is called in this case. |
| 414 | """ |
| 415 | try: |
| 416 | await self.initialize() |
| 417 | except Exception: |
| 418 | await self.shutdown() |
| 419 | raise |
| 420 | return self |
| 421 | |
| 422 | async def __aexit__( |
| 423 | self, |
nothing calls this directly
no test coverage detected