Skip to content

Commit

Permalink
fix: update jsdoc and convert user_id type
Browse files Browse the repository at this point in the history
  • Loading branch information
ikechan8370 committed May 6, 2024
1 parent 22210be commit 47d4081
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/adapter/onebot/OneBot11.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ class OneBot11 extends KarinAdapter {
async #message_event (data) {
let message = {
self_id: data.self_id,
user_id: data.sender.user_id,
user_id: data.sender.user_id + '',
time: data.time,
message_id: data.message_id,
message_seq: data.message_seq,
sender: {
uid: data.sender.user_id,
uin: data.sender.user_id,
uid: data.sender.user_id + '',
uin: data.sender.user_id + '',
nick: data.sender.nickname
}
}
Expand Down
6 changes: 5 additions & 1 deletion lib/bot/KarinEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ export class KarinEvent {

/**
* 发送者信息
* @type {Object}
* @type {{
* uid: string,
* uin: string,
* nick?: string
* }}
*/
sender

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default class plugin {
}

/**
* @param {string|object|Array} msg - 发送的消息
* @param {string|KarinElement|Array<KarinElement>} msg - 发送的消息
* @param {object} data - 回复数据
* @param {boolean?} data.at - 是否at用户
* @param {boolean?} data.reply - 是否引用回复
Expand Down

0 comments on commit 47d4081

Please sign in to comment.