Skip to content

Commit

Permalink
0.3.2
Browse files Browse the repository at this point in the history
修复回复时的空行[@issue/13](#13)
  • Loading branch information
NumberSir committed Apr 4, 2023
1 parent d5715fb commit 54f3118
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ salt = "xxx" # 随机字符串
</div>

## 更新日志
> 2023-04-04 v0.3.2
> - 修复回复时的空行[@issue/13](https://github.com/NumberSir/nonebot_plugin_baidutranslate/issues/13)
>
> 2023-03-29 v0.3.1
> - 现在私聊也可用(但不推荐)
>
Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_baidutranslate/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def _process_response(self, response: httpx.Response):
json_data = response.json()
if "error_code" not in json_data.keys(): # 通用翻译
_result = json_data['trans_result'][0]
res = f"\n原文{_result['src']}\n译文:{_result['dst']}"
res = f"原文{_result['src']}\n译文:{_result['dst']}"
return "QAQ,翻译出来太长了,请发的短一些吧..." if len(res) > 2000 else res

if json_data["error_code"] == 0: # 语种识别
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setuptools.setup(
name="nonebot_plugin_baidutranslate",
version="0.3.1",
version="0.3.2",
author="Number_Sir",
author_email="Number_Sir@126.com",
keywords=["pip", "nonebot2", "nonebot", "nonebot_plugin"],
Expand Down

0 comments on commit 54f3118

Please sign in to comment.