onebots 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ export declare class FriendAction {
12
12
  * 发送私聊消息
13
13
  * @param user_id {number} 用户id
14
14
  * @param message {import('onebots/lib/service/v12').Sendable} 消息
15
- * @param quote {import('onebots/lib/service/v12').SegmentElem<'reply'>} 引用内容
15
+ * @param source {import('onebots/lib/service/v12').SegmentElem<'reply'>} 引用内容
16
16
  */
17
- sendPrivateMsg(this: V12, user_id: number, message: V12.Sendable, quote?: V12.SegmentElem<'reply'>): Promise<import("icqq").MessageRet>;
17
+ sendPrivateMsg(this: V12, user_id: number, message: V12.Sendable, source?: V12.SegmentElem<'reply'>): Promise<import("icqq").MessageRet>;
18
18
  }
@@ -13,14 +13,14 @@ class FriendAction {
13
13
  * 发送私聊消息
14
14
  * @param user_id {number} 用户id
15
15
  * @param message {import('onebots/lib/service/v12').Sendable} 消息
16
- * @param quote {import('onebots/lib/service/v12').SegmentElem<'reply'>} 引用内容
16
+ * @param source {import('onebots/lib/service/v12').SegmentElem<'reply'>} 引用内容
17
17
  */
18
- async sendPrivateMsg(user_id, message, quote) {
19
- let { element, quote_id } = await utils_1.processMessage.apply(this.client, [message, quote]);
18
+ async sendPrivateMsg(user_id, message, source) {
19
+ let { element, quote } = await utils_1.processMessage.apply(this.client, [message, source]);
20
20
  element = await utils_1.processMusic.apply(this.client, ['friend', user_id, element]);
21
21
  if (!element.length)
22
22
  return;
23
- return await this.client.sendPrivateMsg(user_id, element, quote_id ? await this.client.getMsg(quote_id) : undefined);
23
+ return await this.client.sendPrivateMsg(user_id, element, quote ? await this.client.getMsg(quote.data.message_id) : undefined);
24
24
  }
25
25
  }
26
26
  exports.FriendAction = FriendAction;
@@ -4,9 +4,9 @@ export declare class GroupAction {
4
4
  * 发送群聊消息
5
5
  * @param group_id {number} 群id
6
6
  * @param message {import('icqq/lib/service').Sendable} 消息
7
- * @param quote {import('onebots/lib/service/v12').SegmentElem<'reply'>} 引用内容
7
+ * @param source {import('onebots/lib/service/v12').SegmentElem<'reply'>} 引用内容
8
8
  */
9
- sendGroupMsg(this: V12, group_id: number, message: V12.Sendable, quote?: V12.SegmentElem<'reply'>): Promise<import("icqq").MessageRet>;
9
+ sendGroupMsg(this: V12, group_id: number, message: V12.Sendable, source?: V12.SegmentElem<'reply'>): Promise<import("icqq").MessageRet>;
10
10
  /**
11
11
  * 群组踢人
12
12
  * @param group_id {number} 群id
@@ -7,14 +7,14 @@ class GroupAction {
7
7
  * 发送群聊消息
8
8
  * @param group_id {number} 群id
9
9
  * @param message {import('icqq/lib/service').Sendable} 消息
10
- * @param quote {import('onebots/lib/service/v12').SegmentElem<'reply'>} 引用内容
10
+ * @param source {import('onebots/lib/service/v12').SegmentElem<'reply'>} 引用内容
11
11
  */
12
- async sendGroupMsg(group_id, message, quote) {
13
- let { element, quote_id } = await utils_1.processMessage.apply(this.client, [message, quote]);
12
+ async sendGroupMsg(group_id, message, source) {
13
+ let { element, quote } = await utils_1.processMessage.apply(this.client, [message, source]);
14
14
  element = await utils_1.processMusic.apply(this.client, ['group', group_id, element]);
15
15
  if (!element.length)
16
16
  return;
17
- return await this.client.sendGroupMsg(group_id, element, quote_id ? await this.client.getMsg(quote_id) : undefined);
17
+ return await this.client.sendGroupMsg(group_id, element, quote ? await this.client.getMsg(quote.data.message_id) : undefined);
18
18
  }
19
19
  /**
20
20
  * 群组踢人
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onebots",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "基于icqq的多例oneBot实现",
5
5
  "engines": {
6
6
  "node": ">=16"