Remove unnecessary pass using regex in Message.clean_content

The utils.escape_mentions should deal with it
This commit is contained in:
Rapptz 2019-12-25 04:19:27 -05:00
parent 6794bdaac5
commit fdab6e464f

View File

@ -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):