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")