nonebot2/tests/test_plugins/test_feishu.py

13 lines
383 B
Python
Raw Normal View History

2021-09-24 20:26:50 +08:00
from nonebot.typing import T_State
from nonebot.plugin import on_command
from nonebot.adapters.feishu import MessageEvent
from nonebot.adapters.feishu import Bot as FeishuBot
2021-07-03 13:53:01 +08:00
2021-07-06 14:58:00 +08:00
helper = on_command("say")
2021-07-03 13:53:01 +08:00
@helper.handle()
2021-09-24 20:26:50 +08:00
async def feishu_helper(bot: FeishuBot, event: MessageEvent, state: T_State):
2021-07-09 16:15:24 +08:00
message = event.get_message()
await helper.finish(message, at_sender=True)