You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a peculiarity about persistentMessageMap, while it seems the ids are properly preserved and should function as intended when this feature is enabled, the discord side fails to execute actions with certain messages after a restart, it seems maybe discord.js needs those messages fetched/cached before using? it works fine telegram to discord, and if you simulate the queries on persistentMessageMap, it seems the issue is the discord side, here's some steps to reproduce the issue:
message on both telegram and discord
reply to each from both
reply to the replies on both
restart bot
try to reply to all messages on both sides
try to edit all messages on both sides
try to delete everything on the discord side with cross delete on
Some screenshots:
Before Restart
After Restart and Editing messages on both sides
After Restart and Cross Deleting all messages from Discord
In these examples, only test 6 failed, but I've seen several messages fail after a restart, this was a base case scenario of sorts.
These examples also don't include attempts to reply to messages after restarting.
The text was updated successfully, but these errors were encountered:
MyrTheMoth
changed the title
Discord.js fails to relay messages preserved by persistentMessageMap
TediCross fails to reply/edit/delete messages preserved by persistentMessageMap
Sep 18, 2023
Tested this.
Here is what I can add.
If skipOldMessages: true - than none edits or deletes of old (persistent stored) messages are transferred from D to T after bot restart.
If skipOldMessages: false - than edits or delete only for LAST ONE old (persistent stored) message transferred from Discord to T.
I suppose that it's a specific behavior of Discord's system and can not be overridden.
There's a peculiarity about persistentMessageMap, while it seems the ids are properly preserved and should function as intended when this feature is enabled, the discord side fails to execute actions with certain messages after a restart, it seems maybe discord.js needs those messages fetched/cached before using? it works fine telegram to discord, and if you simulate the queries on persistentMessageMap, it seems the issue is the discord side, here's some steps to reproduce the issue:
Some screenshots:
Before Restart
After Restart and Editing messages on both sides
After Restart and Cross Deleting all messages from Discord
In these examples, only test 6 failed, but I've seen several messages fail after a restart, this was a base case scenario of sorts.
These examples also don't include attempts to reply to messages after restarting.
The text was updated successfully, but these errors were encountered: