Skip to content

Commit c65c758

Browse files
committed
fix bug in triggerFunction
1 parent b784521 commit c65c758

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
**一个基于 [WeChatFerry](https://github.com/lich0821/WeChatFerry) 的微信机器人。**
1111

12-
1312
**支持自动拉人,自动群发,入群欢迎,AI回复,关键词回复,定时任务等功能!如果有更多需求,欢迎进群交流!**
1413

1514
**注意⚠️:此项目仅供学习交流使用,请勿做违法犯罪行为,否则后果自负!!!**
@@ -21,12 +20,16 @@
2120
**如果你觉得此项目不错,可以给个Star,或者关注一下公众号**
2221

2322

24-
25-
2623
| ![Image 1](./assets/gzh_code.jpg) | ![Image 2](./assets/star_code.jpg) |
2724
|:-:|:-:|
2825
| 后台回复 `加群` 进群交流 | 如果你觉得有用 |
2926

27+
### 1.1、新手入门
28+
29+
1. [一款微信AI机器人开发框架!稳定可靠,小白友好](https://mp.weixin.qq.com/s/Dq7zw54Dd0p1WgaPKLGanA)
30+
31+
2. [借 WeChatFerry 东风,我把微信机器人复活了!](https://mp.weixin.qq.com/s/sNet-pHVGWMPL9dPNQ9Aag)
32+
3033
## 📖 2、项目结构
3134

3235
```shell

servers/msg_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ def triggerFunction(self, msg, triggerType, triggerWords, chatid):
124124
if triggerType == 'gzhRetrive':
125125
# 调用指定公众号文章进行回复
126126
response = self.aps.get_yuanqi(content)
127-
self.sendTextMsg(msg, bot_answer)
127+
self.sendTextMsg(msg, response)
128128
self.lra.updateMessage(chatid, [msg.content, response])
129129
elif triggerType == 'difySearch':
130130
# 调用dify搜索智能体进行回复
131131
pre_text = f'{self.bot_name}正在调用搜索引擎为您服务,请耐心等待哦,预计20-60s'
132132
self.sendTextMsg(msg, pre_text)
133133
response = self.lta.difySearch(content, user=self.bot_name)
134-
self.sendTextMsg(msg, bot_answer)
134+
self.sendTextMsg(msg, response)
135135
self.lra.updateMessage(chatid, [msg.content, response])
136136
elif triggerType == 'beikeRetrive':
137137
match = re.search(r'\d+', content)

0 commit comments

Comments
 (0)