mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
fix: remove long translation result forward
This commit is contained in:
parent
f1b950ce58
commit
bf75c002c0
2 changed files with 13 additions and 4 deletions
|
|
@ -170,10 +170,10 @@ ${translateLangLabels}
|
|||
await this.reply(err.message, e.isGroup)
|
||||
return false
|
||||
}
|
||||
const totalLength = Array.isArray(result)
|
||||
? result.reduce((acc, cur) => acc + cur.length, 0)
|
||||
: result.length
|
||||
if (totalLength > 300 || multiText) {
|
||||
// const totalLength = Array.isArray(result)
|
||||
// ? result.reduce((acc, cur) => acc + cur.length, 0)
|
||||
// : result.length
|
||||
if (multiText) {
|
||||
// 多条翻译结果
|
||||
if (Array.isArray(result)) {
|
||||
result = await makeForwardMsg(e, result, '翻译结果')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue