diff options
| -rw-r--r-- | bot/cogs/snekbox.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bot/cogs/snekbox.py b/bot/cogs/snekbox.py index 4335e03c4..9e90461cb 100644 --- a/bot/cogs/snekbox.py +++ b/bot/cogs/snekbox.py @@ -64,7 +64,11 @@ class Snekbox: async with ctx.typing(): message = await self.rmq.consume(str(ctx.author.id), **RMQ_ARGS) - output = message.body.decode().strip(" \n") # Remove spaces and newlines from the ends + + if isinstance(message, str): + output = str.strip(" \n") + else: + output = message.body.decode().strip(" \n") if "```" in output: output = "Code block escape attempt detected; will not output result" |