ChatGPT-wechat-bot
ChatGPT-wechat-bot copied to clipboard
群聊有问题啊,关键词为空,@我之后,没有回复消息
群聊有问题啊,关键词为空,@我之后,没有回复消息
Originally posted by @ivil in https://github.com/AutumnWhj/ChatGPT-wechat-bot/issues/48#issuecomment-1345459985 是的群聊有问题,私聊正常
是这样的,我也遇到了
同问
这个我稍微改了一下代码,反正目前是有效的,更改的文件时index.ts(虽然我也没完全看懂)
const pattern = RegExp(`${config.groupKey}`);
if (config.autoReply) {
if (content.startsWith(config.groupKey)) {
const groupContent = content.replace(pattern, '');
replyMessage(room, content.trim());
return;
} else {
console.log(
'Content is not within the scope of the customizition format'
);
}
}
具体的细节还是等待作者更改,这么修改之后相当于简化了识别方式,你需要提前把groupkey设置为需要的形式比如 @wechat_name @runto2006 @goushijie
问题貌似出在群昵称上,仅当没有设置群昵称、用户直接at你的微信名的时候才能匹配识别
问题貌似出在群昵称上,仅当没有设置群昵称、用户直接at你的微信名的时候才能匹配识别
我试了 但还是没有用
这个我稍微改了一下代码,反正目前是有效的,更改的文件时index.ts(虽然我也没完全看懂)
const pattern = RegExp(`${config.groupKey}`); if (config.autoReply) { if (content.startsWith(config.groupKey)) { const groupContent = content.replace(pattern, ''); replyMessage(room, content.trim()); return; } else { console.log( 'Content is not within the scope of the customizition format' ); } }
具体的细节还是等待作者更改,这么修改之后相当于简化了识别方式,你需要提前把groupkey设置为需要的形式比如 @wechat_name @runto2006 @goushijie
这样改了之后所有的群聊都会触发 啊哈哈 我被一个群踢了