MCPcopy Index your code
hub / github.com/nonebot/nonebot2 / called_api_hook2

Function called_api_hook2

tests/test_adapters/test_bot.py:215–227  ·  view source on GitHub ↗
(
        bot: Bot,
        exception: Exception | None,
        api: str,
        data: dict[str, Any],
        result: Any,
    )

Source from the content-addressed store, hash-verified

213 raise MockApiException(1)
214
215 async def called_api_hook2(
216 bot: Bot,
217 exception: Exception | None,
218 api: str,
219 data: dict[str, Any],
220 result: Any,
221 ):
222 nonlocal runned2
223 runned2 = True
224 with anyio.fail_after(1):
225 await event.wait()
226
227 raise MockApiException(2)
228
229 hooks = set()
230

Callers

nothing calls this directly

Calls 2

MockApiExceptionClass · 0.90
waitMethod · 0.80

Tested by

no test coverage detected