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
this is a painful API because these two objects are very different. I understand that d.js GuildMember requires a guild object, but a partial object that doesn't require a guild object would be much better than falling back to a completely separate format.
most d.js bots would probably error on accessing member data if they get added to a guild without the bot scope, since people are probably not handling the raw member case.
Ideal solution or implementation
Introducing a new partial guild member class that takes a guild ID rather than a full guild object. It should support as much of GuildMember's interface as is possible to implement without having a full guild object. interaction.member should create an object of this class if the guild is uncached.
Alternative solutions or implementations
No response
Other context
this is currently an issue for adding apps with only the applications.commands scope, and it is also an issue for user apps, which will probably be used a lot more than the former.
The text was updated successfully, but these errors were encountered:
I've been looking into this a little. Im curious tho, what would be the cause for discord.js actually returning a APIGuildMember instead of a normal GuildMember?
Which application or package is this feature request for?
discord.js
Feature
Currently, interaction.member can either be a discord.js member object or a raw Discord member object:
discord.js/packages/discord.js/src/structures/BaseInteraction.js
Lines 63 to 67 in e412a22
this is a painful API because these two objects are very different. I understand that d.js GuildMember requires a guild object, but a partial object that doesn't require a guild object would be much better than falling back to a completely separate format.
most d.js bots would probably error on accessing member data if they get added to a guild without the bot scope, since people are probably not handling the raw member case.
Ideal solution or implementation
Introducing a new partial guild member class that takes a guild ID rather than a full guild object. It should support as much of GuildMember's interface as is possible to implement without having a full guild object. interaction.member should create an object of this class if the guild is uncached.
Alternative solutions or implementations
No response
Other context
this is currently an issue for adding apps with only the applications.commands scope, and it is also an issue for user apps, which will probably be used a lot more than the former.
The text was updated successfully, but these errors were encountered: