mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2026-06-14 16:42:30 +00:00
猜成语:支持指定游戏查看答案
This commit is contained in:
@@ -384,9 +384,9 @@ handle_answer_matcher = on_alconna(
|
|||||||
Alconna(
|
Alconna(
|
||||||
"handle_answer",
|
"handle_answer",
|
||||||
Option(
|
Option(
|
||||||
"-g|--group",
|
"-s|--specify",
|
||||||
default="Now",
|
default="Now",
|
||||||
args=Args["group", str, "Now"],
|
args=Args["specify", str, "Now"],
|
||||||
),
|
),
|
||||||
Option(
|
Option(
|
||||||
"-l|--list",
|
"-l|--list",
|
||||||
@@ -407,6 +407,7 @@ handle_answer_matcher = on_alconna(
|
|||||||
async def _(
|
async def _(
|
||||||
result: Arparma,
|
result: Arparma,
|
||||||
user_id: UserId,
|
user_id: UserId,
|
||||||
|
uninfo: Uninfo,
|
||||||
):
|
):
|
||||||
|
|
||||||
if handle_config.handle_superuser_get_answer:
|
if handle_config.handle_superuser_get_answer:
|
||||||
@@ -422,12 +423,10 @@ async def _(
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if result.options["group"].args["group"] == "Now":
|
if (spn := result.options["specify"].args["specify"]) == "Now":
|
||||||
session_numstr = user_id
|
session_numstr = user_id
|
||||||
else:
|
else:
|
||||||
await handle_answer_matcher.finish(
|
session_numstr = user_id.replace(uninfo.scene_path, spn)
|
||||||
UniMessage.text("暂不支持指定群组") # TODO: 指定群组获取答案
|
|
||||||
)
|
|
||||||
|
|
||||||
except:
|
except:
|
||||||
session_numstr = user_id
|
session_numstr = user_id
|
||||||
|
|||||||
Reference in New Issue
Block a user