FKLC / WhatsAppToDiscord

WhatsAppToDiscord is a Discord bot that uses WhatsApp Web as a bridge between Discord and WhatsApp.
https://fklc.github.io/WhatsAppToDiscord/
MIT License
238 stars 67 forks source link

Channels not saving anymore. #146

Closed JasperTheMinecraftDev closed 1 year ago

JasperTheMinecraftDev commented 1 year ago

Hey, previously(when I ran it on windows and not with the latest version) channels were saved so they could continue when the bot restarts. This is not the case anymore with the new and linux version, my channels are unlinked when I restart the bot(I can't do CTRL + C as I use pterodactyl, just killing the bot, probably that's it).

Also, where are they saved? In the chats file? Wanting to modify the discord channel ID's.

FKLC commented 1 year ago

Channels are autosaved every 5 minutes. So it is possible that you lost chats that were opened in the last 5 minutes before killing the bot. I'll keep 5 minutes, but make it configurable, so that you can have more frequent autosaves.

JasperTheMinecraftDev commented 1 year ago

Sounds good. Thanks for the clarification!

JasperTheMinecraftDev commented 1 year ago

Kinda forgot it but where are they stored?

FKLC commented 1 year ago

Oh sorry, yeah, they are stored in storage/chats file. it is a JSON file.

JasperTheMinecraftDev commented 1 year ago

Alright, thank you!