mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-23 02:07:39 +08:00
🐛 在使用 satori 适配器时不能响应例如 武汉天气 的指令
This commit is contained in:
parent
8667706377
commit
c5f8fbe86d
@ -39,6 +39,9 @@ async def _(event: T_MessageEvent, matcher: Matcher):
|
|||||||
# kws = event.message.extract_plain_text()
|
# kws = event.message.extract_plain_text()
|
||||||
kws = event.get_plaintext()
|
kws = event.get_plaintext()
|
||||||
image = await get_weather_now_card(matcher, event, [kws.replace("天气", "").replace("weather", "")], False)
|
image = await get_weather_now_card(matcher, event, [kws.replace("天气", "").replace("weather", "")], False)
|
||||||
|
if isinstance(event, satori.event.Event):
|
||||||
|
await matcher.finish(satori.MessageSegment.image(raw=image, mime="image/png"))
|
||||||
|
else:
|
||||||
await matcher.finish(MessageSegment.image(image))
|
await matcher.finish(MessageSegment.image(image))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user