node-karin 0.6.6 → 0.6.7

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.
@@ -267,6 +267,13 @@ export declare class AdapterOneBot11 implements KarinAdapter {
267
267
  id: number;
268
268
  description: string;
269
269
  }[]>;
270
+ /**
271
+ * 对消息进行表情回应
272
+ * @param contact - 联系人信息
273
+ * @param message_id - 消息ID
274
+ * @param face_id - 表情ID
275
+ */
276
+ ReactMessageWithEmoji(contact: contact, message_id: string, face_id: number, is_set?: boolean): Promise<any>;
270
277
  /**
271
278
  * 获取版本信息
272
279
  */
@@ -278,7 +285,6 @@ export declare class AdapterOneBot11 implements KarinAdapter {
278
285
  SetFriendApplyResult(): Promise<void>;
279
286
  SetGroupApplyResult(): Promise<void>;
280
287
  SetInvitedJoinGroupResult(): Promise<void>;
281
- ReactMessageWithEmoji(): Promise<void>;
282
288
  UploadPrivateFile(): Promise<void>;
283
289
  UploadGroupFile(): Promise<void>;
284
290
  sendForwardMessage(): Promise<{}>;
@@ -1208,15 +1208,15 @@ export class AdapterOneBot11 {
1208
1208
  });
1209
1209
  return result;
1210
1210
  }
1211
- // /**
1212
- // * 对消息进行表情回应
1213
- // * @param Contact - 联系人信息
1214
- // * @param message_id - 消息ID
1215
- // * @param face_id - 表情ID
1216
- // */
1217
- // async ReactMessageWithEmoji(Contact: any, message_id: any, face_id: any, is_set = true) {
1218
- // return await this.SendApi('set_msg_emoji_like', { message_id, emoji_id: face_id, is_set })
1219
- // }
1211
+ /**
1212
+ * 对消息进行表情回应
1213
+ * @param contact - 联系人信息
1214
+ * @param message_id - 消息ID
1215
+ * @param face_id - 表情ID
1216
+ */
1217
+ async ReactMessageWithEmoji(contact, message_id, face_id, is_set = true) {
1218
+ return await this.SendApi('set_msg_emoji_like', { message_id, emoji_id: face_id, is_set });
1219
+ }
1220
1220
  /**
1221
1221
  * 获取版本信息
1222
1222
  */
@@ -1234,7 +1234,6 @@ export class AdapterOneBot11 {
1234
1234
  async SetFriendApplyResult() { }
1235
1235
  async SetGroupApplyResult() { }
1236
1236
  async SetInvitedJoinGroupResult() { }
1237
- async ReactMessageWithEmoji() { }
1238
1237
  async UploadPrivateFile() { }
1239
1238
  async UploadGroupFile() { }
1240
1239
  async sendForwardMessage() {
@@ -848,7 +848,7 @@ export type ByPostType<T extends EventPostType> = Extract<OneBot11Event, {
848
848
  /**
849
849
  * - OneBot11公开Api
850
850
  */
851
- export type OneBot11Api = 'send_private_msg' | 'send_group_msg' | 'send_msg' | 'delete_msg' | 'get_msg' | 'get_forward_msg' | 'send_like' | 'set_group_kick' | 'set_group_ban' | 'set_group_anonymous_ban' | 'set_group_whole_ban' | 'set_group_admin' | 'set_group_anonymous' | 'set_group_card' | 'set_group_name' | 'set_group_leave' | 'set_group_special_title' | 'set_friend_add_request' | 'set_group_add_request' | 'get_login_info' | 'get_stranger_info' | 'get_friend_list' | 'get_group_info' | 'get_group_list' | 'get_group_member_info' | 'get_group_member_list' | 'get_group_honor_info' | 'get_cookies' | 'get_csrf_token' | 'get_credentials' | 'get_record' | 'get_image' | 'can_send_image' | 'can_send_record' | 'get_status' | 'get_version_info' | 'set_restart' | 'clean_cache' | 'get_version' | 'send_forward_msg' | 'get_friend_msg_history' | 'get_group_msg_history';
851
+ export type OneBot11Api = 'send_private_msg' | 'send_group_msg' | 'send_msg' | 'delete_msg' | 'get_msg' | 'get_forward_msg' | 'send_like' | 'set_group_kick' | 'set_group_ban' | 'set_group_anonymous_ban' | 'set_group_whole_ban' | 'set_group_admin' | 'set_group_anonymous' | 'set_group_card' | 'set_group_name' | 'set_group_leave' | 'set_group_special_title' | 'set_friend_add_request' | 'set_group_add_request' | 'get_login_info' | 'get_stranger_info' | 'get_friend_list' | 'get_group_info' | 'get_group_list' | 'get_group_member_info' | 'get_group_member_list' | 'get_group_honor_info' | 'get_cookies' | 'get_csrf_token' | 'get_credentials' | 'get_record' | 'get_image' | 'can_send_image' | 'can_send_record' | 'get_status' | 'get_version_info' | 'set_restart' | 'clean_cache' | 'get_version' | 'send_forward_msg' | 'get_friend_msg_history' | 'get_group_msg_history' | 'set_msg_emoji_like';
852
852
  /**
853
853
  * - OneBot11公开Api参数 params
854
854
  */
@@ -1362,6 +1362,23 @@ export type OneBot11ApiParams = {
1362
1362
  */
1363
1363
  message_count: number;
1364
1364
  };
1365
+ /**
1366
+ * - 对消息进行表情回应
1367
+ */
1368
+ set_msg_emoji_like: {
1369
+ /**
1370
+ * - 需要回应的消息 ID
1371
+ */
1372
+ message_id: string;
1373
+ /**
1374
+ * - 回应的表情 ID
1375
+ */
1376
+ emoji_id: number;
1377
+ /**
1378
+ * - 设置、取消
1379
+ */
1380
+ is_set: boolean;
1381
+ };
1365
1382
  };
1366
1383
  /**
1367
1384
  * - OneBot11公开Api与参数映射
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "private": false,
5
5
  "description": "基于 Kritor 进行开发的nodejs机器人框架",
6
6
  "homepage": "https://github.com/KarinJS/Karin",