mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-23 02:07:39 +08:00
拼写错了(尴尬)
This commit is contained in:
parent
c5f8fbe86d
commit
e13464cb7c
@ -16,7 +16,7 @@ from liteyuki.utils import event as event_utils
|
|||||||
require("nonebot_plugin_alconna")
|
require("nonebot_plugin_alconna")
|
||||||
from nonebot_plugin_alconna import on_alconna, Alconna, Args, MultiVar, Arparma, UniMessage
|
from nonebot_plugin_alconna import on_alconna, Alconna, Args, MultiVar, Arparma, UniMessage
|
||||||
|
|
||||||
wrx_alc = on_alconna(
|
wx_alc = on_alconna(
|
||||||
aliases={"天气"},
|
aliases={"天气"},
|
||||||
command=Alconna(
|
command=Alconna(
|
||||||
"weather",
|
"weather",
|
||||||
@ -25,12 +25,12 @@ wrx_alc = on_alconna(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@wrx_alc.handle()
|
@wx_alc.handle()
|
||||||
async def _(result: Arparma, event: T_MessageEvent, matcher: Matcher):
|
async def _(result: Arparma, event: T_MessageEvent, matcher: Matcher):
|
||||||
"""await alconna.send("weather", city)"""
|
"""await alconna.send("weather", city)"""
|
||||||
kws = result.main_args.get("keywords")
|
kws = result.main_args.get("keywords")
|
||||||
image = await get_weather_now_card(matcher, event, kws)
|
image = await get_weather_now_card(matcher, event, kws)
|
||||||
await wrx_alc.finish(UniMessage.image(raw=image))
|
await wx_alc.finish(UniMessage.image(raw=image))
|
||||||
|
|
||||||
|
|
||||||
@on_endswith(("天气", "weather")).handle()
|
@on_endswith(("天气", "weather")).handle()
|
||||||
|
Loading…
Reference in New Issue
Block a user