diff --git a/README.md b/README.md index 434b19a..0b4713f 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,9 @@ salt = "xxx" # 随机字符串 ## 更新日志 +> 2023-04-04 v0.3.2 +> - 修复回复时的空行[@issue/13](https://github.com/NumberSir/nonebot_plugin_baidutranslate/issues/13) +> > 2023-03-29 v0.3.1 > - 现在私聊也可用(但不推荐) > diff --git a/nonebot_plugin_baidutranslate/data_source.py b/nonebot_plugin_baidutranslate/data_source.py index 504f15c..069f8a8 100644 --- a/nonebot_plugin_baidutranslate/data_source.py +++ b/nonebot_plugin_baidutranslate/data_source.py @@ -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: # 语种识别 diff --git a/setup.py b/setup.py index f05aecf..ee7a03e 100644 --- a/setup.py +++ b/setup.py @@ -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"],