MarcusOtter / discord-needle

Needle is a Discord bot that creates Discord threads automatically.

Home Page:https://needle.gg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🐛 Threads are not auto-deleted if the message is deleted after a few hours

MarcusOtter opened this issue · comments

Describe the bug

The auto-delete feature (#253) seems to work fine when the parent message is deleted immediately. However, if one waits for a few hours (probably 2-4h), the feature does not work, according to DoNotResuscitate on Discord.

This would make sense as Needle flushes the cache every 2-4 hours and you don't receive any events for messages that are not cached unless message partials are enabled (which they are not for Needle).

Steps to reproduce the bug

  1. Send a message in an auto-threaded channel
  2. Wait 4+ hours (maybe as little as 2 hours works, not sure exactly how long)
  3. Delete the message.
  4. See nothing happen.

Expected behavior

Needle should delete/archive the thread (depending on permissions and content in the thread).

Working on reproducing the bug atm.

Not sure how feasible this is to fix since we need to enable partials, and I'm not sure how many bugs that's going to introduce & potentially a lot more traffic for Needle. Since nobody has noticed this bug for over a month I'm assuming this feature is mostly used by people that go "Oh, this isn't what I wanted" and immediately delete the thread (at least within a few hours).