diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index 8982f48..e3892c9 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -115,8 +115,9 @@ class Pterodactyl(commands.Cog): regex = await self.config.chat_regex() match: Optional[re.Match[str]] = re.match(regex, text) if match: - self.logger.debug("Message is a chat message") - return {"time": match.group(1), "username": match.group(2), "message": match.group(3)} + dict = {"time": match.group(1), "username": match.group(2), "message": match.group(3)} + self.logger.debug("Message is a chat message\n%s", json.dumps(dict)) + return dict self.logger.debug("Message is not a chat message") return False @@ -126,7 +127,7 @@ class Pterodactyl(commands.Cog): async with aiohttp.ClientSession() as session: async with session.get(f"https://playerdb.co/api/player/{endpoint}/{username}") as response: if response.status == 200: - self.logger.debug("Player info retrieved for %s", username) + self.logger.debug("Player info retrieved for %s\n%s", username, json.dumps(await response.json())) return await response.json() else: self.logger.error("Failed to retrieve player info for %s: %s", username, response.status)