From 936e78348f2f2466dd366e573b3b1e704df943c7 Mon Sep 17 00:00:00 2001 From: Henrik Böving Date: Wed, 30 May 2018 19:36:21 +0200 Subject: Escape unicode (#92) * autocodeblocking * ast fix better type annotations * ci there you go * line too long ==> remove comment * deleting message + lowercase python * comments * remove docstrings * you may * not sure what you mean with move to a new line maybe this? * descriptive enough? * better explanation of text filtering * rewrite * fstring * pep8 * better comment * discord message length * ok shady * ok shady * "This is still async discord.py" * didnt see josephs comment * minor comment changes * blank and typo * typo.. * embed sending * adding waiting time + embed dont know if this is the correct way to store the field string * forgot await * but now i know * i heard him * pls * more descriptive variable name * comment * and better string formatting * approve me lemon * here we go aperture * there we go again * name error..... damn linter plugins * you get it aperture * ok lemon * ok aperture * constants instead of plain channel ID * forgot one * constants in bot.py * lemons way ftw * flake8 is weird man * aperture 1 * next aperture * dunno * imports * next lemon * unicode escape sequences so gdude can lint again --- bot/cogs/bot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bot/cogs/bot.py b/bot/cogs/bot.py index 80cd7d3b0..3f0c8678d 100644 --- a/bot/cogs/bot.py +++ b/bot/cogs/bot.py @@ -252,7 +252,12 @@ class Bot: on_cooldown = (time.time() - self.channel_cooldowns.get(msg.channel.id, 0)) < 300 if not on_cooldown: try: - not_backticks = ["'''", '"""', "´´´", "‘‘‘", "’’’", "′′′", "“““", "”””", "″″″", "〃〃〃"] + not_backticks = [ + "'''", '"""', "\u00b4\u00b4\u00b4", "\u2018\u2018\u2018", "\u2019\u2019\u2019", + "\u2032\u2032\u2032", "\u201c\u201c\u201c", "\u201d\u201d\u201d", "\u2033\u2033\u2033", + "\u3003\u3003\u3003" + ] + bad_ticks = msg.content[:3] in not_backticks if bad_ticks: ticks = msg.content[:3] -- cgit v1.2.3