🐛 fix hook block event receiving bug

This commit is contained in:
yanyongyu
2020-12-28 13:53:24 +08:00
parent c993f15bca
commit 299c259d50
3 changed files with 44 additions and 21 deletions

View 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)