ParseTargetException可以携带prompt参数 (#479)

*  ParseTargetException可以携带prompt参数

*  丰富prompt提示
This commit is contained in:
Azide
2024-05-19 22:02:23 +08:00
committed by GitHub
parent 4bbcd9238c
commit 307739e37a
6 changed files with 34 additions and 10 deletions
+12 -2
View File
@@ -407,7 +407,12 @@ async def test_add_with_bilibili_target_parser(app: App, init_scheduler):
sender=fake_admin_user,
)
ctx.receive_event(bot, event_4_err1)
ctx.should_call_send(event_4_err1, BotReply.add_reply_on_target_parse_input_error, True)
ctx.should_call_send(
event_4_err1,
BotReply.add_reply_on_target_parse_input_error
+ "\n正确格式:\n1. 用户纯数字id\n2. UID:<用户id>\n3. 用户主页链接: https://space.bilibili.com/xxxx",
True,
)
ctx.should_rejected()
event_4_err1 = fake_group_message_event(
@@ -417,7 +422,12 @@ async def test_add_with_bilibili_target_parser(app: App, init_scheduler):
sender=fake_admin_user,
)
ctx.receive_event(bot, event_4_err1)
ctx.should_call_send(event_4_err1, BotReply.add_reply_on_target_parse_input_error, True)
ctx.should_call_send(
event_4_err1,
BotReply.add_reply_on_target_parse_input_error
+ "\n正确格式:\n1. 用户纯数字id\n2. UID:<用户id>\n3. 用户主页链接: https://space.bilibili.com/xxxx",
True,
)
ctx.should_rejected()
event_4_ok = fake_group_message_event(