From b5b96af1dc05a7450748e4ed6bfc81d5b6380aff Mon Sep 17 00:00:00 2001 From: JoeBanks13 Date: Fri, 2 Mar 2018 17:36:19 +0000 Subject: Switch from replace to something else --- bot/cogs/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/cogs/bot.py b/bot/cogs/bot.py index 7551eb0c4..2663b79a8 100644 --- a/bot/cogs/bot.py +++ b/bot/cogs/bot.py @@ -78,10 +78,10 @@ class Bot: if time.time()-self.previous_format_times[msg.channel.id] > 300 or msg.channel.id == DEVTEST_CHANNEL: if msg.content.count("\n") >= 3: try: - # Some users formatted multi-line code using `'s + # Some users formatted multi-line code using `'sip(" # This fixes that by treating them as nothing. if "`" in msg.content: - msg.content = msg.content.replace("`", "").replace("`", "") + msg.content = msg.content[:-1][1:] tree = ast.parse(msg.content) # Attempts to parse the message into an AST node. -- cgit v1.2.3