mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 09:52:30 -05:00
Bump RLL and improve logging (#5044)
* version bump * - bump RLL - logging changes - player.channel.guild->player.guild - small cleanup around logging changes * missed one * here this one too * Apply suggestions from code review Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * add one missing player log * missed one * Format with Black Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -102,7 +102,7 @@ class SpotifyWrapper:
|
||||
async with self.session.request("GET", url, params=params, headers=headers) as r:
|
||||
data = await r.json(loads=json.loads)
|
||||
if r.status != 200:
|
||||
log.debug(f"Issue making GET request to {url}: [{r.status}] {data}")
|
||||
log.debug("Issue making GET request to %r: [%d] %r", url, r.status, data)
|
||||
return data
|
||||
|
||||
async def update_token(self, new_token: Mapping[str, str]):
|
||||
@@ -146,7 +146,7 @@ class SpotifyWrapper:
|
||||
except KeyError:
|
||||
return None
|
||||
self.spotify_token = token
|
||||
log.debug(f"Created a new access token for Spotify: {token}")
|
||||
log.debug("Created a new access token for Spotify: %s", token)
|
||||
return self.spotify_token["access_token"]
|
||||
|
||||
async def post(
|
||||
@@ -156,7 +156,7 @@ class SpotifyWrapper:
|
||||
async with self.session.post(url, data=payload, headers=headers) as r:
|
||||
data = await r.json(loads=json.loads)
|
||||
if r.status != 200:
|
||||
log.debug(f"Issue making POST request to {url}: [{r.status}] {data}")
|
||||
log.debug("Issue making POST request to %r: [%d] %r", url, r.status, data)
|
||||
return data
|
||||
|
||||
async def make_get_call(self, url: str, params: MutableMapping) -> MutableMapping:
|
||||
|
||||
Reference in New Issue
Block a user