Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object has no attribute 'credits' #4

Closed
hieupham1103 opened this issue Aug 11, 2021 · 1 comment
Closed

object has no attribute 'credits' #4

hieupham1103 opened this issue Aug 11, 2021 · 1 comment

Comments

@hieupham1103
Copy link

I use Tatsu API to get user's credit, but it has problem is 'object has no attribute 'credits''.
It also appears when I use avatar_url, avatar_hash,...

@commands.command()
    async def transfer(self,ctx, member: discord.Member):
      wrapper = ApiWrapper(key=os.environ['token'])
      user_profile = await wrapper.get_profile(member.id)
      await ctx.send(user_profile.credits)
@PumPum7
Copy link
Owner

PumPum7 commented Sep 6, 2021

I can not reproduce this error. Can you send me the user id of a user where it happens?

This is the code i used:

@pytest.mark.asyncio
async def test_get_profile():
    wrapper = tatsu.wrapper.ApiWrapper(key=APIKEY)
    result = await wrapper.get_profile(274561812664549376)
    print(result.credits)
    assert result.credits is not None

@PumPum7 PumPum7 closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants