Removing messages from cache after a certain time
Could the code above that removes messages from cache after an hour affect events like
messageCreate
, messageDelete
, messageUpdate
or messageBulkDelete
?5 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPIf you have partials disabled, then
messageDelete
and messageUpdate
(unsure about messageBulkDelete
) may not emit on messages that were removed from the cache
Those swept messages would be treated the same as messages sent before your bot last started: uncached but the events can still emit if you have the correct partial(s)I have the message partial
but for example, let's say someone edits their message to a rule-breaking message after 1 hour (so after it was removed from cache) would
messageCreate
still trigger?messageCreate
would never trigger in that scenario
messageUpdate
would still emit only because you have the partial
Same goes for Delete
oh alright
ty