mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 08:11:38 +00:00
🐛 fix hook block event receiving bug
This commit is contained in:
14
tests/test_plugins/test_ws_hook.py
Normal file
14
tests/test_plugins/test_ws_hook.py
Normal file
@ -0,0 +1,14 @@
|
||||
import nonebot
|
||||
from nonebot.adapters import Bot
|
||||
|
||||
driver = nonebot.get_driver()
|
||||
|
||||
|
||||
@driver.on_bot_connect
|
||||
async def connect(bot: Bot) -> None:
|
||||
print("Connect", bot)
|
||||
|
||||
|
||||
@driver.on_bot_disconnect
|
||||
async def disconnect(bot: Bot) -> None:
|
||||
print("Disconnect", bot)
|
Reference in New Issue
Block a user