✨ 新增在线查漏补缺功能

This commit is contained in:
2025-06-29 01:45:24 +08:00
parent ca6a414ba4
commit c6f24bc3c2
72 changed files with 807 additions and 208 deletions
+36 -1
View File
@@ -58,7 +58,7 @@ async def handle_register(session: Uninfo):
)
msg = (
g_sTranslation["register"]["success"]
g_sTranslation["register"]["success"].format(point=500)
if success
else g_sTranslation["register"]["error"]
)
@@ -549,6 +549,41 @@ async def _(session: Uninfo):
# await MessageUtils.alc_forward_msg([info], session.self_id, BotConfig.self_nickname).send(reply_to=True)
soil_upgrade = on_alconna(
Alconna("土地升级", Args["index", int]),
priority=5,
block=True,
)
@soil_upgrade.handle()
async def _(session: Uninfo, index: Query[int] = AlconnaQuery("num", 1)):
uid = str(session.user.id)
if not await g_pToolManager.isRegisteredByUid(uid):
return
condition = await g_pFarmManager.soilUpgradeCondition(uid, index.result)
await MessageUtils.build_message(condition).send(reply_to=True)
@waiter(waits=["message"], keep_session=True)
async def check(event: Event):
return event.get_plaintext()
resp = await check.wait(timeout=60)
if resp is None:
await MessageUtils.build_message(g_sTranslation["soilInfo"]["timeOut"]).send(
reply_to=True
)
return
if not resp == "是":
return
res = await g_pFarmManager.soilUpgrade(uid, index.result)
await MessageUtils.build_message(res).send(reply_to=True)
diuse_farm.shortcut(
"农场下阶段(.*?)",
command="我的农场",