Browse Source

Specify no content type for aiohttp reqs

master
Purpur 4 years ago
committed by GitHub
parent
commit
aed4916999
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cogs/timings.py

4
cogs/timings.py

@ -59,9 +59,9 @@ class Timings(commands.Cog):
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.get(timings_url_raw) as response: async with session.get(timings_url_raw) as response:
request_raw = await response.json()
request_raw = await response.json(content_type=None)
async with session.get(timings_json) as response: async with session.get(timings_json) as response:
request = await response.json()
request = await response.json(content_type=None)
if request is None or request_raw is None: if request is None or request_raw is None:
embed_var.add_field(name="❌ Invalid report", embed_var.add_field(name="❌ Invalid report",
value="Create a new timings report.") value="Create a new timings report.")

Loading…
Cancel
Save