From fcb8bc02657d0ada825bb866422d219ed9fe0175 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Fri, 3 Apr 2026 02:05:54 +0200 Subject: [PATCH] Prefer using repr() on the Dev cog results (excl. str instances) (#6726) --- redbot/core/dev_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redbot/core/dev_commands.py b/redbot/core/dev_commands.py index d0e400f2c..579403218 100644 --- a/redbot/core/dev_commands.py +++ b/redbot/core/dev_commands.py @@ -158,7 +158,7 @@ class DevOutput: output.append(self.formatted_exc) elif self.always_include_result or self.result is not None: try: - result = str(self.result) + result = str(self.result) if isinstance(self.result, str) else repr(self.result) # ensure that the result can be encoded (GH-6485) result.encode("utf-8") except Exception as exc: