From 221a1944e73da4a2062e2e0db3a794733bbcc50c Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sun, 29 Jul 2018 20:06:17 +0100 Subject: `'generator' object is not subscriptable` --- bot/cogs/events.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/cogs/events.py b/bot/cogs/events.py index 721e51e3d..0b9b75a00 100644 --- a/bot/cogs/events.py +++ b/bot/cogs/events.py @@ -100,7 +100,8 @@ class Events: headers={"X-API-Key": Keys.site_api} ) - return await response.json()["data"] + resp = await response.json() + return resp["data"] async def on_command_error(self, ctx: Context, e: CommandError): command = ctx.command -- cgit v1.2.3