Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lgc2333 committed Dec 8, 2023
1 parent 84ac785 commit 3f0867e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ Telegram:[@lgc2333](https://t.me/lgc2333)

## 📝 更新日志

### 0.1.1

- 修复查询到多个车次不会提示的问题

### 0.1.0

- 🎉 Create this project
2 changes: 1 addition & 1 deletion nonebot_plugin_cnrail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 列车时刻表",
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_cnrail/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 3f0867e

Please sign in to comment.