Traceback (most recent call last):
File "/Users/kelvin/Documents/code/bot/venv/lib/python3.13/site-packages/discord/ext/commands/core.py", line 266, in wrapped
ret = await coro(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kelvin/Documents/code/bot/utils/bases/cog.py", line 43, in wrapper
voted = await self.bot.topgg.get_user_vote(ctx.author.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/kelvin/Documents/code/bot/venv/lib/python3.13/site-packages/topgg/client.py", line 348, in get_user_vote
return bool(data["voted"])
~~~~^^^^^^^^^
TypeError: string indices must be integers, not 'str'
it seems like the get_user_vote() returns a dumped version of the payload. using json.loads() seems to fix this. i have checked pip freeze & im using topggpy==1.4.0 (assuming this is the latest version). not sure if theres double encoding on your end or not.
it seems like the
get_user_vote()returns a dumped version of the payload. using json.loads() seems to fix this. i have checkedpip freeze& im usingtopggpy==1.4.0(assuming this is the latest version). not sure if theres double encoding on your end or not.