nonebot2/tests/test_plugins/test_feishu.py

13 lines
395 B
Python
Raw Normal View History

2021-07-04 14:17:59 +08:00
from nonebot.adapters.feishu.event import MessageEvent
2021-07-03 13:53:01 +08:00
from nonebot.rule import to_me
from nonebot.plugin import on_command
from nonebot.adapters.feishu import Bot as FeishuBot, MessageSegment, MessageEvent
2021-07-04 14:17:59 +08:00
helper = on_command("114514")
2021-07-03 13:53:01 +08:00
@helper.handle()
async def ding_helper(bot: FeishuBot, event: MessageEvent):
2021-07-04 14:17:59 +08:00
message = MessageSegment.text("1919810")
2021-07-03 13:53:01 +08:00
await helper.finish(message)