mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 08:44:10 +00:00
Message.clean_content now handles everyone mentions properly.
This commit is contained in:
parent
94d31834fc
commit
085e8d4eb3
@ -158,6 +158,8 @@ class Message:
|
||||
manner. This basically means that mentions are transformed
|
||||
into the way the client shows it. e.g. ``<#id>`` will transform
|
||||
into ``#name``.
|
||||
|
||||
This will also transform @everyone mentions into non-mentions.
|
||||
"""
|
||||
|
||||
transformations = {
|
||||
@ -171,6 +173,7 @@ class Message:
|
||||
}
|
||||
|
||||
transformations.update(mention_transforms)
|
||||
transformations[re.escape('@everyone')] = '@\u200beveryone'
|
||||
|
||||
def repl(obj):
|
||||
return transformations.get(re.escape(obj.group(0)), '')
|
||||
|
Loading…
x
Reference in New Issue
Block a user