Bots Can';t向bale bot发送文件消息

Bots Can';t向bale bot发送文件消息,bots,bale-messenger,Bots,Bale Messenger,正在尝试将文件消息发送到bale.ai bot。上传似乎工作正常,但当它达到发送功能时,连接将被重置。有什么问题 let ddd = fs.readFileSync(__dirname + '/a.html') bot.UploadFile(ddd,'file').then(response => { let fileId = response.fileId let fileAccessHash = response.accessHash let fileٰVersion = respo

正在尝试将文件消息发送到bale.ai bot。上传似乎工作正常,但当它达到发送功能时,连接将被重置。有什么问题

let ddd = fs.readFileSync(__dirname + '/a.html') 
bot.UploadFile(ddd,'file').then(response => {
let fileId = response.fileId
let fileAccessHash = response.accessHash
let fileٰVersion = response.version

const stats = fs.statSync(__dirname + '/a.html')
var file = new SDK.FileMessage(fileId, fileAccessHash, 'telename', stats.size, 'text/html', 'see')
bot.send(file, responder.peer)

fileId和accessHash必须是字符串,替换此行

var file = new SDK.FileMessage(fileId.toString(), fileAccessHash.toString(), 'telename', stats.size, 'text/html', 'see')
和你的一样