fix: link reporting index out of range
This commit is contained in:
parent
404e617314
commit
bb5f4d3154
2 changed files with 2 additions and 2 deletions
|
@ -204,4 +204,4 @@ async def handle_links(message: Message):
|
||||||
if final_urls:
|
if final_urls:
|
||||||
await message.reply(f"{"\n".join(final_urls)}\n消息里有包含跟踪参数的链接,已经帮你转换了哦~\n\n注意:"
|
await message.reply(f"{"\n".join(final_urls)}\n消息里有包含跟踪参数的链接,已经帮你转换了哦~\n\n注意:"
|
||||||
f"这个功能是试验性的,可能会出现链接无法访问等问题,如果出现链接没有清理干净的情况,"
|
f"这个功能是试验性的,可能会出现链接无法访问等问题,如果出现链接没有清理干净的情况,"
|
||||||
f"可以将返回的结果再次发送给bot,或者尝试手动清理。\n如果你找到了这个工具的问题,欢迎把它通过 `/report_broken_links 链接` 报告给开发者!")
|
f"可以将返回的结果再次发送给bot,或者尝试手动清理。\n如果我没有回复链接,说明链接不需要被清理\n如果你找到了这个工具的问题,欢迎把它通过 `/report_broken_links 链接 需要去除的参数等等` 报告给开发者!")
|
|
@ -24,7 +24,7 @@ async def report_broken_links(message: Message):
|
||||||
# 处理报告逻辑(例如,保存到数据库或发送给开发者)
|
# 处理报告逻辑(例如,保存到数据库或发送给开发者)
|
||||||
report_content = f"用户 {message.from_user.full_name} ({message.from_user.id}) 报告了以下链接的问题:\n"
|
report_content = f"用户 {message.from_user.full_name} ({message.from_user.id}) 报告了以下链接的问题:\n"
|
||||||
report_content += "\n".join(links) + "\n"
|
report_content += "\n".join(links) + "\n"
|
||||||
report_content += f"描述:{text.split(' ')[2] if ' ' in text else text}\n"
|
report_content += f"描述:{' '.join(text.split(' ')[2:]) if ' ' in text and len(text.split(' ')) >= 3 else ''.join(text.split(' ')[1:])}\n"
|
||||||
|
|
||||||
# 将 report_content 发送到开发者
|
# 将 report_content 发送到开发者
|
||||||
developer_id = config.get_developer_id() # 从配置获取开发者ID
|
developer_id = config.get_developer_id() # 从配置获取开发者ID
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue