You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.
I have the code python @bot.command(pass_context=True,brief='Checks if a user has a valid Minecraft Username just input the username') @commands.has_role("SuperAdmin") async def verify(ctx, *, username): """validates a users MC account actually exists""" url = f'https://api.mojang.com/users/profiles/minecraft/{username}?' javacheck = requests.get(url) status = javacheck.status_code if status != 204: uuid = javacheck.json()['id'] await ctx.send(f'{username} checks out as a *Java* player') if status == 204: try: gt = xbox.GamerProfile.from_gamertag(username) await ctx.send(f'{username} checks out as a *Bedrock* player') except xbox.exceptions.GamertagNotFound: await ctx.send(f'{username} is not a valid minecraft account on any platform')
and I get the error: Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
randomly when i am using my code, but restarting the application fixes the error. The code works most of the time, but after a while if it needs to call the Xbox Live API it just doesn't work.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have the code
python @bot.command(pass_context=True,brief='Checks if a user has a valid Minecraft Username just input the username') @commands.has_role("SuperAdmin") async def verify(ctx, *, username): """validates a users MC account actually exists""" url = f'https://api.mojang.com/users/profiles/minecraft/{username}?' javacheck = requests.get(url) status = javacheck.status_code if status != 204: uuid = javacheck.json()['id'] await ctx.send(f'{username} checks out as a *Java* player') if status == 204: try: gt = xbox.GamerProfile.from_gamertag(username) await ctx.send(f'{username} checks out as a *Bedrock* player') except xbox.exceptions.GamertagNotFound: await ctx.send(f'{username} is not a valid minecraft account on any platform')
and I get the error: Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
randomly when i am using my code, but restarting the application fixes the error. The code works most of the time, but after a while if it needs to call the Xbox Live API it just doesn't work.
The text was updated successfully, but these errors were encountered: