wangrongding / wechat-bot

🤖一个基于 WeChaty 结合 OpenAi ChatGPT / Kimi / 讯飞等Ai服务实现的微信机器人 ,可以用来帮助你自动回复微信消息,或者管理微信群/好友,检测僵尸粉等...
MIT License
4.39k stars 658 forks source link

为啥config.js中增加了白名单后,重新运用,之前的消息全部重发了 #104

Closed xkcp008 closed 1 year ago

xkcp008 commented 1 year ago

为啥config.js中增加了白名单后,重新运行,之前的消息全部重发了

DavidWanBYS commented 1 year ago

为啥config.js中增加了白名单后,重新运行,之前的消息全部重发了

你是使用node.js部署的吗?

csky89 commented 1 year ago

我也遇到这样的问题了,没找到在哪缓存的,也没法手动清除

xkcp008 commented 1 year ago

@wangrongding ,大佬,帮忙回答下这个问题,重发太烦了

DavidWanBYS commented 1 year ago

看了网友评论,建议先不要使用,有微信号被封的封的风险

从 Windows 版邮件https://go.microsoft.com/fwlink/?LinkId=550986发送

发件人: @.> 发送时间: 2023年2月9日 15:51 收件人: @.> 抄送: wandanhui @.>; @.> 主题: Re: [wangrongding/wechat-bot] 为啥config.js中增加了白名单后,重新运用,之前的消息全部重发了 (Issue #104)

我也遇到这样的问题了,没找到在哪缓存的,也没法手动清除

― Reply to this email directly, view it on GitHubhttps://github.com/wangrongding/wechat-bot/issues/104#issuecomment-1423770660, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4QGCQTQ422HS4R7DZZJO53WWSOVXANCNFSM6AAAAAAUVLXAYM. You are receiving this because you commented.Message ID: @.***>

xkcp008 commented 1 year ago

看了网友评论,建议先不要使用,有微信号被封的封的风险 从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送 发件人: @.> 发送时间: 2023年2月9日 15:51 收件人: @.> 抄送: wandanhui @.>; @.> 主题: Re: [wangrongding/wechat-bot] 为啥config.js中增加了白名单后,重新运用,之前的消息全部重发了 (Issue #104) 我也遇到这样的问题了,没找到在哪缓存的,也没法手动清除 ― Reply to this email directly, view it on GitHub<#104 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4QGCQTQ422HS4R7DZZJO53WWSOVXANCNFSM6AAAAAAUVLXAYM. You are receiving this because you commented.Message ID: @.***>

我已经被封两次了,确实不敢,但是问题还是要解决的啊

DavidWanBYS commented 1 year ago

看了网友评论,建议先不要使用,有微信号被封的封的风险 从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送 发件人: @.**> 发送时间: 2023年2月9日 15:51 收件人: @.**> 抄送: wandanhui @.**>; @.**> 主题: Re: [wangrongding/wechat-bot] 为啥config.js中增加了白名单后,重新运用,之前的消息全部重发了 (Issue #104) 我也遇到这样的问题了,没找到在哪缓存的,也没法手动清除 ― Reply to this email directly, view it on GitHub<#104 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A4QGCQTQ422HS4R7DZZJO53WWSOVXANCNFSM6AAAAAAUVLXAYM. You are receiving this because you commented.Message ID: @.***>

我已经被封两次了,确实不敢,但是问题还是要解决的啊

被封两次你还用,真顶风作案啊🤣

hujinttao commented 1 year ago

解决重启服务后,会重发历史消息的问题,可以这样 解决: 1.删除根目录下的WechatEveryDay.memory-card.json文件,缓存文件,和微信相关的都在这个里面 删除后,就和第一次启动服务一样了,扫描登录,历史消息不会再重发了

jazzqi commented 1 year ago

可以对比一下 msg.timestamp,旧消息直接跳过。

参考: https://github.com/jazzqi/wechat-bot/blob/main/src/wechaty/sendMessage.js#L27

deardeer7 commented 1 year ago

可以对比一下 msg.timestamp,旧消息直接跳过。

参考: https://github.com/jazzqi/wechat-bot/blob/main/src/wechaty/sendMessage.js#L27

这个对使用时有影响吗,我加了那行对比时间戳的代码,重启确实没有重发了,但使用过程中发现bot有时候收不到消息 补充:好像是网络或者openai的问题,不加也有这种情况。

yuin2018 commented 1 year ago

msg.age()表示此条消息存活的时间, 单位为秒, 判断一下就好了

wangrongding commented 1 year ago

这个问题已经被 #107 修复了