From 8f94fbed2d1510ea9a59c47bb7b94635e48b07b9 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 5 Dec 2023 21:14:13 +0000 Subject: [PATCH] Fix whois --- cogs/other.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogs/other.py b/cogs/other.py index 7a39b69..ee9711e 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -2341,10 +2341,12 @@ class OtherCog(commands.Cog): return await ctx.respond("Invalid domain.") process = await asyncio.create_subprocess_exec( - "whois", "-H", url.hostname, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, text=True + "whois", "-H", url.hostname, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE ) stdout, stderr = await process.communicate() await process.wait() + stdout = stdout.decode("utf-8", "replace") + stderr = stderr.decode("utf-8", "replace") if process.returncode != 0: return await ctx.respond(f"Error:\n```{stderr[:3900]}```")