Bring back expand
Closed this issue · 3 comments
Is your feature request related to a problem? Please describe.
I'm always frustrated when I can't use the expand function in the rewrite anymore to expand my users or other objects I need full information from.
Describe the solution you'd like
I would like expand functions to come back
Describe alternatives you've considered
using client.get_xyz for everything but using expand is just 100% easier and more effective since it makes the change that I expand the wrong thing 0 (node with expand you just add it behind your object and you go form a partial object to a full one)
Additional context
I think it would help make it easier to get full objects when you need them also you never know what information what partial information the api wrapper gives back whiteout going deep in to the documentation or code.
Also adding this back would be 1 less breaking change form version 1.0,0 to 2.* depending on when you implement it
When I call BaseUser.expand() I expect a User back. When I call User.expand(), what should happen?
@jmkd3v the full user (but you are only meant to use it on Partial or Base objects)
Also you could just trow an error if you do it on a full object.
I'm unsure about this. I'm imagining a BaseUser.expand()
function and I guess it would look something like this:
async def expand(self):
await self._client.get_user(self.id)
Why is this a useful behavior? I don't think it's that helpful as opposed to just client.get_user(user.id)