timotejroiko / discord.js-light

All the power of discord.js, zero caching. This library modifies discord.js's internal classes and functions in order to give you full control over its caching behaviour.
Apache License 2.0
292 stars 29 forks source link

URGENT: Fixed broken reaction objects #73

Closed GoogleSites closed 3 years ago

GoogleSites commented 3 years ago

Currently, the reaction parameter in the guildReactionAdd and guildReactionRemove events return DMChannel channel types, null guild and undefined channelId (among all other missing data). This is due to the lack of information passed to Base#_add, which in turn doesn't set the corresponding guildId or channelId parameters to the message when creating it, trickling the lack of information down to the corresponding MessageReactions originating from the Message. I have added channel_jd and guild_id to correctly return the channel and guild from reactions. I'm not sure if there's anything else to add there, but I'm sure you know more than me about it.

GoogleSites commented 3 years ago

The lack of channelId and guildId also breaks most Message methods, like editing, removing reactions, and pretty much everything else (which is fixed with these additions).

timotejroiko commented 3 years ago

good catch, one would think the message would inherit that information from the channel its being added to, but i guess discord.js broke that when they changed channel and guild to getters