wechaty-web-panel 1.5.1 → 1.5.2

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/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  ## 更新日志
2
+ ### V1.5.2(2023-04-04)
3
+ 1、修复回调问题
4
+ 2、去除群合影问题
2
5
 
3
- ### V1.4.18(2023-04-04)
6
+ ### V1.5.1(2023-04-04)
4
7
  1、去除头像处理和群合影功能,因为占用依赖过大,且不稳定
5
8
  2、支持chatGPT 模型在线切换
6
9
  3、支持chatGPT 网页hook版本切换
package/README.md CHANGED
@@ -21,7 +21,8 @@ Wechaty Web Panel 插件,让你的 wechaty 机器人快速接入 web 控制面
21
21
  - [x] 天行机器人
22
22
  - [x] 图灵机器人
23
23
  - [x] 腾讯闲聊机器人
24
- - [x] ChatGPT api
24
+ - [x] ChatGPT api (支持切换模型)
25
+ - [x] ChatGPT 网页hook
25
26
  - [x] 微信对话开放平台
26
27
  - [ ] 更多
27
28
 
@@ -48,8 +49,8 @@ Wechaty Web Panel 插件,让你的 wechaty 机器人快速接入 web 控制面
48
49
  - [x] 获取表情包 例: "表情包你好坏"
49
50
  - [x] 获取美女图 例: "美女图"
50
51
  - [x] 群合影 例: "群合影"
51
- - [x] 牛年头像 例: "牛气冲天"
52
- - [x] 国旗头像 例: "我要国旗"(下线)
52
+ ~~- [x] 牛年头像 例: "牛气冲天"~~
53
+ ~~- [x] 国旗头像 例: "我要国旗"(下线)~~
53
54
  - [ ] 更多待你发现
54
55
  - [x] 进群自动欢迎
55
56
  - [x] 加好友自动回复
@@ -62,7 +63,7 @@ Wechaty Web Panel 插件,让你的 wechaty 机器人快速接入 web 控制面
62
63
 
63
64
  * 特色功能
64
65
 
65
- - [x] 群合影(下线)
66
+ ~~- [x] 群合影(下线)~~
66
67
  - [x] 主动发送消息
67
68
  - [x] 主动更新配置
68
69
  - [x] 主动同步好友和群列表
@@ -6,7 +6,7 @@ exports.packageJson = void 0;
6
6
  */
7
7
  exports.packageJson = {
8
8
  "name": "wechaty-web-panel",
9
- "version": "1.5.1",
9
+ "version": "1.5.2",
10
10
  "description": "智能微秘书插件",
11
11
  "exports": {
12
12
  ".": {
@@ -36,13 +36,13 @@ service.interceptors.response.use((response) => {
36
36
  return Promise.resolve(res.data);
37
37
  }
38
38
  else {
39
- const res = [{ type: 1, content: '回调函数返回参数错误:' + JSON.stringify(res.data) }];
40
- return Promise.resolve(res);
39
+ const result = [{ type: 1, content: '回调函数返回参数错误:' + JSON.stringify(res.data) }];
40
+ return Promise.resolve(result);
41
41
  }
42
42
  }
43
43
  else {
44
- const res = [{ type: 1, content: res.msg }];
45
- return Promise.resolve(res);
44
+ const result = [{ type: 1, content: res.msg }];
45
+ return Promise.resolve(result);
46
46
  }
47
47
  }
48
48
  const res = [{ type: 1, content: '回调接口网络错误:' + response.status }];
@@ -69,38 +69,9 @@ async function dispatchEventContent(that, eName, msg, name, id, avatar, room) {
69
69
  url = await (0, aibotk_js_1.getMeiNv)();
70
70
  type = 2;
71
71
  break;
72
- case 'ncov':
73
- content = await api_js_1.default.getNcov();
74
- break;
75
72
  case 'cname':
76
73
  content = await api_js_1.default.getCname();
77
74
  break;
78
- case 'roomCloud': {
79
- let wordContent = '';
80
- const roomName = await room.topic(); // 获取群名
81
- const config = await (0, aibotk_js_1.getWordCloudConfig)(roomName);
82
- if (!config.authList) {
83
- content = '本群暂未开通群词云功能,请联系群主或管理员开启';
84
- }
85
- else if (config.authList.length) {
86
- if (config.authList.includes(name)) {
87
- wordContent = await (0, roomDb_js_1.getRoomRecordContent)(roomName, config.day);
88
- const baseImg = await (0, aibotk_js_1.getWordCloud)(wordContent, config.background, config.border);
89
- type = 3;
90
- url = baseImg;
91
- }
92
- else {
93
- content = '很抱歉,你没有生成群词云的权限,请联系管理员或群主开通';
94
- }
95
- }
96
- else {
97
- wordContent = await (0, roomDb_js_1.getRoomRecordContent)(roomName, config.day);
98
- const baseImg = await (0, aibotk_js_1.getWordCloud)(wordContent, config.background, config.border);
99
- type = 3;
100
- url = baseImg;
101
- }
102
- break;
103
- }
104
75
  case 'removeRecord': {
105
76
  const roomName = await room.topic(); // 获取群名
106
77
  const config = await (0, aibotk_js_1.getWordCloudConfig)(roomName);
@@ -52,7 +52,6 @@ async function filterFriendMsg(that, contact, msg) {
52
52
  { bool: msg.startsWith(REMINDKEY), method: 'scheduleJobMsg' },
53
53
  { bool: config.callBackEvents && config.callBackEvents.length > 0, method: 'callbackEvent' },
54
54
  { bool: config.eventKeywords && config.eventKeywords.length > 0, method: 'eventMsg' },
55
- { bool: config.avatarList && config.avatarList.length > 0, method: 'avatarCrop' },
56
55
  { bool: true, method: 'keywordsMsg' },
57
56
  { bool: config.autoReply && config.botScope !== 'room', method: 'robotMsg' },
58
57
  ];
@@ -83,7 +82,6 @@ async function filterRoomMsg({ that, msg, name, id, avatar, room, isMention }) {
83
82
  { bool: msg === '', method: 'emptyMsg' },
84
83
  { bool: config.callBackEvents && config.callBackEvents.length > 0, method: 'callbackEvent' },
85
84
  { bool: config.eventKeywords && config.eventKeywords.length > 0, method: 'eventMsg' },
86
- { bool: config.avatarList && config.avatarList.length > 0, method: 'avatarCrop' },
87
85
  { bool: true, method: 'keywordsMsg' },
88
86
  { bool: config.autoReply && config.botScope !== 'friend', method: 'robotMsg' },
89
87
  ];
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const packageJson = {
5
5
  "name": "wechaty-web-panel",
6
- "version": "1.5.1",
6
+ "version": "1.5.2",
7
7
  "description": "智能微秘书插件",
8
8
  "exports": {
9
9
  ".": {
@@ -29,13 +29,13 @@ service.interceptors.response.use((response) => {
29
29
  return Promise.resolve(res.data);
30
30
  }
31
31
  else {
32
- const res = [{ type: 1, content: '回调函数返回参数错误:' + JSON.stringify(res.data) }];
33
- return Promise.resolve(res);
32
+ const result = [{ type: 1, content: '回调函数返回参数错误:' + JSON.stringify(res.data) }];
33
+ return Promise.resolve(result);
34
34
  }
35
35
  }
36
36
  else {
37
- const res = [{ type: 1, content: res.msg }];
38
- return Promise.resolve(res);
37
+ const result = [{ type: 1, content: res.msg }];
38
+ return Promise.resolve(result);
39
39
  }
40
40
  }
41
41
  const res = [{ type: 1, content: '回调接口网络错误:' + response.status }];
@@ -63,38 +63,9 @@ async function dispatchEventContent(that, eName, msg, name, id, avatar, room) {
63
63
  url = await getMeiNv();
64
64
  type = 2;
65
65
  break;
66
- case 'ncov':
67
- content = await api.getNcov();
68
- break;
69
66
  case 'cname':
70
67
  content = await api.getCname();
71
68
  break;
72
- case 'roomCloud': {
73
- let wordContent = '';
74
- const roomName = await room.topic(); // 获取群名
75
- const config = await getWordCloudConfig(roomName);
76
- if (!config.authList) {
77
- content = '本群暂未开通群词云功能,请联系群主或管理员开启';
78
- }
79
- else if (config.authList.length) {
80
- if (config.authList.includes(name)) {
81
- wordContent = await getRoomRecordContent(roomName, config.day);
82
- const baseImg = await getWordCloud(wordContent, config.background, config.border);
83
- type = 3;
84
- url = baseImg;
85
- }
86
- else {
87
- content = '很抱歉,你没有生成群词云的权限,请联系管理员或群主开通';
88
- }
89
- }
90
- else {
91
- wordContent = await getRoomRecordContent(roomName, config.day);
92
- const baseImg = await getWordCloud(wordContent, config.background, config.border);
93
- type = 3;
94
- url = baseImg;
95
- }
96
- break;
97
- }
98
69
  case 'removeRecord': {
99
70
  const roomName = await room.topic(); // 获取群名
100
71
  const config = await getWordCloudConfig(roomName);
@@ -46,7 +46,6 @@ async function filterFriendMsg(that, contact, msg) {
46
46
  { bool: msg.startsWith(REMINDKEY), method: 'scheduleJobMsg' },
47
47
  { bool: config.callBackEvents && config.callBackEvents.length > 0, method: 'callbackEvent' },
48
48
  { bool: config.eventKeywords && config.eventKeywords.length > 0, method: 'eventMsg' },
49
- { bool: config.avatarList && config.avatarList.length > 0, method: 'avatarCrop' },
50
49
  { bool: true, method: 'keywordsMsg' },
51
50
  { bool: config.autoReply && config.botScope !== 'room', method: 'robotMsg' },
52
51
  ];
@@ -76,7 +75,6 @@ async function filterRoomMsg({ that, msg, name, id, avatar, room, isMention }) {
76
75
  { bool: msg === '', method: 'emptyMsg' },
77
76
  { bool: config.callBackEvents && config.callBackEvents.length > 0, method: 'callbackEvent' },
78
77
  { bool: config.eventKeywords && config.eventKeywords.length > 0, method: 'eventMsg' },
79
- { bool: config.avatarList && config.avatarList.length > 0, method: 'avatarCrop' },
80
78
  { bool: true, method: 'keywordsMsg' },
81
79
  { bool: config.autoReply && config.botScope !== 'friend', method: 'robotMsg' },
82
80
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wechaty-web-panel",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "智能微秘书插件",
5
5
  "exports": {
6
6
  ".": {