Closed Cola-Ace closed 1 month ago
另外,在调用session.bot.getForwardMsg的时候总是timeout,而通过api调试工具直接向qq发送请求则正常
onebot 没有这个 API。你是不是把 onebot 跟其他协议搞混了?
go-cqhttp支持这个,而且我看代码中也有相关的函数
另外,在调用session.bot.getForwardMsg的时候总是timeout,而通过api调试工具直接向qq发送请求则正常
顺便能请您看看这个问题发生的原因吗
另外,在调用session.bot.getForwardMsg的时候总是timeout,而通过api调试工具直接向qq发送请求则正常
应该是 session.onebot.getForwardMsg 对吧?
可能需要看看请求参数。
TypeError: Cannot read properties of undefined (reading 'downloadFile')
这个说明 session.onebot
可能就不存在。你是在什么情况下调用的?能看看代码吗?
TypeError: Cannot read properties of undefined (reading 'downloadFile')
这个说明
session.onebot
可能就不存在。你是在什么情况下调用的?能看看代码吗?
我用qqbot.internal.downloadFile就好了,应该是我在discord发送消息时session.onebot不存在的问题
另外,在调用session.bot.getForwardMsg的时候总是timeout,而通过api调试工具直接向qq发送请求则正常
应该是 session.onebot.getForwardMsg 对吧?
可能需要看看请求参数。
{ messageId: '-2147483038', id: '-2147483038', elements: [{ type: 'forward', attrs: { id: '7397666445403751866' }, children: []}], content: '<forward id="7397666445403751866"/>' }
我传入的参数是elements[0].attrs.id
,且具体代码中我会确保该element的type为forward,所以传入的参数应该是没问题的
另外,我发现我传入的forward_id和报错消息中的message_id不一致([I]
的是初始的forward_id)
那这个 issue 本身的问题应该算解决了。
后面提的这个问题我怎么感觉是返回了超出整型限制的大数?能看看你的代码吗?
相关测试代码如下: 在当前情景下,我确保session.onebot是可用的,且我传入该函数的参数的类型确定为string而不是整型
已修复。
如题,qq方面是支持这个api的,但是koishi内调用时提示如上,adapter-onebot为最新版