Merge pull request #227 from LLOneBot/dev

fix: Send msg timeout minimum
This commit is contained in:
linyuchen 2024-05-18 16:36:30 +08:00 committed by GitHub
commit 0f99b5cb87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -327,7 +327,7 @@ export async function sendMsg(
} }
} }
log('发送消息总大小', totalSize, 'bytes') log('发送消息总大小', totalSize, 'bytes')
let timeout = ((totalSize / 1024 / 512) * 1000) || 5000 // 512kb/s let timeout = ((totalSize / 1024 / 512) * 1000) + 5000 // 512kb/s
log('设置消息超时时间', timeout) log('设置消息超时时间', timeout)
const returnMsg = await NTQQMsgApi.sendMsg(peer, sendElements, waitComplete, timeout) const returnMsg = await NTQQMsgApi.sendMsg(peer, sendElements, waitComplete, timeout)
log('消息发送结果', returnMsg) log('消息发送结果', returnMsg)