nonebot2/tests/test_plugins/test_feishu.py
2021-07-03 13:53:01 +08:00

13 lines
434 B
Python

from nonebot.adapters.feishu.event import GroupMessageEvent, PrivateMessageEvent
from nonebot.rule import to_me
from nonebot.plugin import on_command
from nonebot.adapters.feishu import Bot as FeishuBot, MessageSegment, MessageEvent
helper = on_command("ding_helper", to_me())
@helper.handle()
async def ding_helper(bot: FeishuBot, event: MessageEvent):
message = MessageSegment.text("114514")
await helper.finish(message)