ro-py/ro.py

Calling group.get_member(id) errors

Closed this issue · 2 comments

Describe the bug
When calling group.get_member(id), the following error is thrown:

obraz

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.

obraz

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 make get_member just return a BaseMember object. I think to make it more consistent with other base methods, like client.get_base_user, it should probably be named group.get_base_member, but I think it's more clear if we don't do that.

Closed by 586b2e4.