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
In the update function for Message.js, a few properties (embeds, mentions, components for example) are set if the appropriate payload contains them. Even though they are marked as optional in the Discord API docs, I see them passed with every MESSAGE_CREATE. The purpose of this issue isn't to argue whether these properties are passed every time but to bring to light the fact that many of the properties in Message are passed as empty arrays. Eris only checks for !== undefined, which means for many instances of Message, there are unnecessary empty arrays being assigned. As a consequence, more memory is used per message which could negatively affect users who cache any large amount of messages in memory.
The text was updated successfully, but these errors were encountered:
In the update function for Message.js, a few properties (embeds, mentions, components for example) are set if the appropriate payload contains them. Even though they are marked as optional in the Discord API docs, I see them passed with every MESSAGE_CREATE. The purpose of this issue isn't to argue whether these properties are passed every time but to bring to light the fact that many of the properties in Message are passed as empty arrays. Eris only checks for
!== undefined
, which means for many instances of Message, there are unnecessary empty arrays being assigned. As a consequence, more memory is used per message which could negatively affect users who cache any large amount of messages in memory.The text was updated successfully, but these errors were encountered: