diff --git a/README.md b/README.md index 267e238..7dd034c 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,10 @@ Telegram:[@lgc2333](https://t.me/lgc2333) ## 📝 更新日志 +### 0.1.1 + +- 修复查询到多个车次不会提示的问题 + ### 0.1.0 - 🎉 Create this project diff --git a/nonebot_plugin_cnrail/__init__.py b/nonebot_plugin_cnrail/__init__.py index b0c1826..b62ca34 100644 --- a/nonebot_plugin_cnrail/__init__.py +++ b/nonebot_plugin_cnrail/__init__.py @@ -6,7 +6,7 @@ from .__main__ import usage # noqa: E402 from .config import ConfigModel # noqa: E402 -__version__ = "0.1.0" +__version__ = "0.1.1" __plugin_meta__ = PluginMetadata( name="CNRail", description="查询 12306 列车时刻表", diff --git a/nonebot_plugin_cnrail/__main__.py b/nonebot_plugin_cnrail/__main__.py index a133667..fb4f7c9 100644 --- a/nonebot_plugin_cnrail/__main__.py +++ b/nonebot_plugin_cnrail/__main__.py @@ -22,7 +22,7 @@ async def _(matcher: Matcher, arg_msg: Message = CommandArg()): train_info = await query_train_info(train_no) except MultipleTrainFoundError as e: much_text = "\n结果过多,仅显示前五个" if len(e.trains) > 5 else "" - info_text = "\n".join(x.word for x in e.trains[5:]) + info_text = "\n".join(x.word for x in e.trains[:5]) await matcher.finish(f"查询到多个车次,请检查您的车次是否正确\n{info_text}{much_text}") except Exception: logger.exception("Failed to query train info")