Calling group.get_member(id) errors
Closed this issue · 2 comments
zmadie commented
Describe the bug
When calling group.get_member(id)
, the following error is thrown:
To Reproduce
Call .get_member(id)
on a group object.
Expected behaviour
Expected the call to not error and return a Member
object.
Additional context
A request to https://groups.roblox.com/v2/users/{userId}/groups/roles is sent, and passed on to Member
. It will attempt to index the user
key on the data, which errors because the endpoint does not return that data.
jmkd3v commented
While this is a bug, the entire way we handle group members needs to change.
I want to turn Member into an abstract object- the only way to get the entire data that the Member object needs are:
- looping through a group's members
- looping through a role's members
As such, I think we should makeget_member
just return aBaseMember
object. I think to make it more consistent with other base methods, likeclient.get_base_user
, it should probably be namedgroup.get_base_member
, but I think it's more clear if we don't do that.