nonebot2/tests/test_plugins/test_ws_hook.py
2020-12-28 13:53:24 +08:00

15 lines
264 B
Python

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)