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
Please describe the problem you are having in as much detail as possible:
Currently the only way to check if a certain structure in Discord.js is stale is by checking the cache or crosschecking with the API.
Ex:
A Message is created and then deleted for whatever reason. The message object is removed from the API and the cache, but the object won't be GCed immediately. Now you have a stale message object and the only way to check if this message object is stale or not is by checking the cache
and/or trying to fetch the message back from the API.
This applies for pretty much any structure that can be deleted from the API.
It'd be nice to have a property on the structure that would be set to true, i.e. <Message>.deleted, when the Delete WS Event comes in for that structure.
<Structure>.deletable only checks whether or not the Bot has the Permissions to delete it, not if its already been deleted or not.
Edit: This is doesn't take in the fact that we have Events for those deletion purposes. I think the property could still be warranted as useful disregarding those.
The text was updated successfully, but these errors were encountered:
Please describe the problem you are having in as much detail as possible:
Currently the only way to check if a certain structure in Discord.js is stale is by checking the cache or crosschecking with the API.
Ex:
A Message is created and then deleted for whatever reason. The message object is removed from the API and the cache, but the object won't be GCed immediately. Now you have a stale message object and the only way to check if this message object is stale or not is by checking the cache
and/or trying to fetch the message back from the API.
This applies for pretty much any structure that can be deleted from the API.
It'd be nice to have a property on the structure that would be set to true, i.e.
<Message>.deleted
, when the Delete WS Event comes in for that structure.<Structure>.deletable
only checks whether or not the Bot has the Permissions to delete it, not if its already been deleted or not.Edit: This is doesn't take in the fact that we have Events for those deletion purposes. I think the property could still be warranted as useful disregarding those.
The text was updated successfully, but these errors were encountered: