Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重启应用后会收到历史消息,导致回复重复。 #67

Closed
hdfk7 opened this issue Apr 9, 2023 · 4 comments
Closed

重启应用后会收到历史消息,导致回复重复。 #67

hdfk7 opened this issue Apr 9, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@hdfk7
Copy link

hdfk7 commented Apr 9, 2023

在chatgpt.ts定义一个启动时间 startTime: Date = new Date();
然后在main.ts中的.on("message"方法中加入以下代码可以解决。
let msgDate = message.date();
if (msgDate.getTime() <= chatGPTBot.startTime.getTime()) {
return;
}

@kx-Huang
Copy link
Owner

kx-Huang commented Apr 9, 2023

好的,我去复现一下,谢谢

@kx-Huang kx-Huang added the bug Something isn't working label Apr 11, 2023
@luglio13
Copy link

luglio13 commented Jun 9, 2023

请问网站在线部署 需要怎么操作

@kx-Huang
Copy link
Owner

kx-Huang commented Jun 9, 2023

Please refer to this section in README, thanks.

@kx-Huang
Copy link
Owner

Fixed in latest commit. Thanks a lot for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants