From fdab6e464fd3bd1fcb94d5dc5b431cf05f5eda34 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 25 Dec 2019 04:19:27 -0500 Subject: [PATCH] Remove unnecessary pass using regex in Message.clean_content The utils.escape_mentions should deal with it --- discord/message.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/discord/message.py b/discord/message.py index db082a981..738b06e97 100644 --- a/discord/message.py +++ b/discord/message.py @@ -549,18 +549,7 @@ class Message: pattern = re.compile('|'.join(transformations.keys())) result = pattern.sub(repl, self.content) - - transformations = { - '@everyone': '@\u200beveryone', - '@here': '@\u200bhere' - } - - def repl2(obj): - return transformations.get(obj.group(0), '') - - pattern = re.compile('|'.join(transformations.keys())) - replaced = pattern.sub(repl2, result) - return escape_mentions(replaced) + return escape_mentions(result) @property def created_at(self):