🐛 修复历史遗留BUG

✨ 预增对服务端的请求
This commit is contained in:
2025-04-09 17:14:37 +08:00
parent d17c1b8ed7
commit 194c630d4e
9 changed files with 54 additions and 26 deletions
+4 -4
View File
@@ -50,7 +50,7 @@ diuse_farm = on_alconna(
"我的农场",
Option("--all", action=store_true),
Subcommand("my-point", help_text="我的农场币"),
Subcommand("seed-shop", help_text="种子商店"),
Subcommand("seed-shop", Args["num?", int], help_text="种子商店"),
Subcommand("buy-seed", Args["name?", str]["num?", int], help_text="购买种子"),
Subcommand("my-seed", help_text="我的种子"),
Subcommand("sowing", Args["name?", str]["num?", int], help_text="播种"),
@@ -96,20 +96,20 @@ async def _(session: Uninfo):
await MessageUtils.build_message(f"你的当前农场币为: {point}").send(reply_to=True)
diuse_farm.shortcut(
"种子商店",
"种子商店(.*?)",
command="我的农场",
arguments=["seed-shop"],
prefix=True,
)
@diuse_farm.assign("seed-shop")
async def _(session: Uninfo):
async def _(session: Uninfo, num: Query[int] = AlconnaQuery("num", 0)):
uid = str(session.user.id)
if await isRegisteredByUid(uid) == False:
return
image = await g_pShopManager.getSeedShopImage()
image = await g_pShopManager.getSeedShopImage(num.result)
await MessageUtils.build_message(image).send()
diuse_farm.shortcut(