oicq-icalingua-plus-plus 1.22.8 → 1.22.9

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.
package/http-api/api.js CHANGED
@@ -6,7 +6,7 @@ let bot;
6
6
  class NotFoundError extends Error {}
7
7
 
8
8
  const available_actions = [
9
- "sendPrivateMsg",
9
+ "_sendPrivateMsg",
10
10
  "sendGroupMsg",
11
11
  "sendDiscussMsg",
12
12
  "sendMsg",
@@ -116,7 +116,7 @@ function toHump(action) {
116
116
 
117
117
  function quickOperate(event, res) {
118
118
  if (event.post_type === "message" && res.reply) {
119
- const action = event.message_type === "private" ? "sendPrivateMsg" : "sendGroupMsg";
119
+ const action = event.message_type === "private" ? "_sendPrivateMsg" : "sendGroupMsg";
120
120
  const id = event.message_type === "private" ? event.user_id : event.group_id;
121
121
  bot[action](id, res.reply, res.auto_escape);
122
122
  if (event.group_id) {
package/http-api/core.js CHANGED
@@ -460,7 +460,7 @@ function loop() {
460
460
  if (bot.gl.has(target))
461
461
  bot.sendGroupMsg(target, abc[1]);
462
462
  else
463
- bot.sendPrivateMsg(target, abc[1]);
463
+ bot._sendPrivateMsg(target, abc[1]);
464
464
  break;
465
465
  case "eval":
466
466
  try {
package/index.d.ts CHANGED
@@ -933,7 +933,7 @@ export class Client extends EventEmitter {
933
933
  getGroupInfo(group_id: number, no_cache?: boolean): Promise<Ret<GroupInfo>>;
934
934
 
935
935
  /** 私聊 */
936
- sendPrivateMsg(user_id: number, message: Sendable, auto_escape?: boolean): Promise<Ret<{ message_id: string }>>;
936
+ _sendPrivateMsg(user_id: number, message: Sendable, auto_escape?: boolean): Promise<Ret<{ message_id: string }>>;
937
937
  /** 群聊 */
938
938
  sendGroupMsg(group_id: number, message: Sendable, auto_escape?: boolean): Promise<Ret<{ message_id: string }>>;
939
939
  /** 群临时会话,大多数时候可以使用私聊达到同样效果 */
package/lib/client-ext.js CHANGED
@@ -288,7 +288,7 @@ Client.prototype.pbGetMsg = async function () {
288
288
  try {
289
289
  const data = await parseC2CMsg.call(this, msg, true);
290
290
  if (data && data.raw_message) {
291
- data.reply = (message, auto_escape = false) => this.sendPrivateMsg(data.user_id, message, auto_escape);
291
+ data.reply = (message, auto_escape = false) => this._sendPrivateMsg(data.user_id, message, auto_escape);
292
292
  this.logger.info(`recv from: [Private: ${data.user_id}(${data.sub_type})] ` + data.raw_message);
293
293
  this.em("message.private." + data.sub_type, data);
294
294
  }
package/lib/client.js CHANGED
@@ -348,7 +348,7 @@ class Client extends EventEmitter {
348
348
 
349
349
  ///////////////////////////////////////////////////
350
350
 
351
- sendPrivateMsg(user_id, message = "", auto_escape = false) {
351
+ _sendPrivateMsg(user_id, message = "", auto_escape = false) {
352
352
  return this._useProtocol(chat.sendMsg, [user_id, message, auto_escape, 0]);
353
353
  }
354
354
  sendGroupMsg(group_id, message = "", auto_escape = false) {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "oicq-icalingua-plus-plus",
3
3
  "app_name": "oicq-icalingua-plus-plus",
4
- "version": "1.22.8",
5
- "app_version": "1.22.8",
6
- "upday": "2022/08/27",
4
+ "version": "1.22.9",
5
+ "app_version": "1.22.9",
6
+ "upday": "2022/09/06",
7
7
  "protocol_version": "v11",
8
8
  "description": "oicq(https://github.com/takayama-lily/oicq) v1 for Icalingua++",
9
9
  "main": "index.js",