We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
These code should be changed to be compatible with oicq v2.x(will be released soon)
私聊消息事件中,删除了sender和user_id字段,添加了from_id和to_id字段。如果来自群还会有group_id字段。 群消息的sender字段中,不再提供sex age area。 群消息的seqid字段更名为seq。
According to https://github.com/takayama-lily/oicq/projects/3#card-70996148, this code here should use rawPayload.from_id instead of rawPayload.sender.user_id.
puppet-oicq/src/puppet-oicq.ts
Line 201 in 30f6412
This field will be missed for group message.
Line 339 in 30f6412
The text was updated successfully, but these errors were encountered:
need to handle rejection after node.js 16
API返回格式变更: 旧:返回的数据放在data字段中 新:直接返回数据(或throw) ※所以可能会抛出 Promise Rejection ,调用者需要自己捕捉(当然也可以不关心) ※之前data字段为null的api返回 Promise 表示是否成功 ※注意:如果你使用Node.js16以上,不处理Rejection会导致程序挂掉,建议至少设定一个全局监听器:
https://github.com/takayama-lily/oicq/projects/3#card-67539296
process.on('unhandledRejection',()=>{ //什么都不做 })
Sorry, something went wrong.
message_id标记为废弃,原因是由于从服务端获得的消息时间时常会有秒数偏差,导致明明是同一条生成的消息id却不同。 建议使用seq+rand的形式更精确的管理消息。 https://github.com/takayama-lily/oicq/projects/3#card-71004439
We used to get the message_id get from oicq, but now need to manage message id ourself.
※所以可能会抛出 Promise Rejection ,调用者需要自己捕捉(当然也可以不关心)
What we should do for dealing with the Promise Rejection is using puppet.emit('error', e):
puppet.emit('error', e)
try { await oicqClient.dataApi() } catch (e) { puppetOicq.emit('error', e) }
We should not register any process events in our Puppet implementation code because we should keep all environments to be as clean as possible.
process
No branches or pull requests
These code should be changed to be compatible with oicq v2.x(will be released soon)
According to https://github.com/takayama-lily/oicq/projects/3#card-70996148, this code here should
use rawPayload.from_id instead of rawPayload.sender.user_id.
puppet-oicq/src/puppet-oicq.ts
Line 201 in 30f6412
This field will be missed for group message.
puppet-oicq/src/puppet-oicq.ts
Line 339 in 30f6412
The text was updated successfully, but these errors were encountered: