From fbb5873884cbd47e43c26626236fd49f97e5ea02 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Sat, 14 Jul 2018 23:09:51 -0500 Subject: [PATCH] Update clientsession line --- cogs/spotify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/spotify.py b/cogs/spotify.py index 21af340..e085876 100644 --- a/cogs/spotify.py +++ b/cogs/spotify.py @@ -26,7 +26,7 @@ class Spotify: url = "https://accounts.spotify.com/api/token" opts = {"grant_type": "client_credentials"} while True: - with aiohttp.ClientSession(headers=self.headers) as session: + async with aiohttp.ClientSession(headers=self.headers) as session: response = await session.post(url, data=opts) data = await response.json() self._token = data.get("access_token")