diff options
| author | Rapptz <[email protected]> | 2016-01-30 06:16:37 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-01-30 06:17:20 -0500 |
| commit | 085e8d4eb361d43f3fc64582a7e011ee09ed1782 (patch) | |
| tree | 348694b35508716e84ceb3ab6592239b2f6e7dbd /discord/message.py | |
| parent | Change enumerators into enumerations to please Voltana. (diff) | |
| download | discord.py-085e8d4eb361d43f3fc64582a7e011ee09ed1782.tar.xz discord.py-085e8d4eb361d43f3fc64582a7e011ee09ed1782.zip | |
Message.clean_content now handles everyone mentions properly.
Diffstat (limited to 'discord/message.py')
| -rw-r--r-- | discord/message.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/discord/message.py b/discord/message.py index 376e5a27..a9d018ea 100644 --- a/discord/message.py +++ b/discord/message.py @@ -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)), '') |