Update accounts.py

Made request_user_by_discord_id use strings
This commit is contained in:
Leander 2023-08-09 10:57:25 +02:00 committed by GitHub
parent 369edc632f
commit bbfaeafafa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ load_dotenv()
async def request_user_by_discord_id(discord_id): async def request_user_by_discord_id(discord_id):
return requests.get( return requests.get(
url=f'https://api.nova-oss.com/users?discord_id={discord_id}', url=f'https://api.nova-oss.com/users?discord_id="{discord_id}"',
timeout=3, timeout=3,
headers={ headers={
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -80,4 +80,4 @@ Please report this issue to the staff!""", ephemeral=True)
await embedder.info(interaction, f"""### Credits of {user.name} await embedder.info(interaction, f"""### Credits of {user.name}
Amount: **{amount_credits if amount_credits < 1000000 else ''}** Amount: **{amount_credits if amount_credits < 1000000 else ''}**
""", ephemeral=True) """, ephemeral=True)