aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar JoeBanks13 <[email protected]>2018-03-02 17:36:19 +0000
committerGravatar JoeBanks13 <[email protected]>2018-03-02 17:36:19 +0000
commitb5b96af1dc05a7450748e4ed6bfc81d5b6380aff (patch)
tree060d4dc48fb1c89357136042f9b6b24e106f5f6a
parentActually syntax highlight the syntax highlight instruction code (diff)
Switch from replace to something else
-rw-r--r--bot/cogs/bot.py4
1 files 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.