diff options
| author | Michael H <[email protected]> | 2020-01-02 16:50:12 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-01-14 19:39:34 -0500 |
| commit | 6cdda4a320c0aeabccd5837402527009075ed173 (patch) | |
| tree | 7d1e8fb610f8d42a9d45e004751279a874055d74 | |
| parent | Fix bug preventing movement of channels when there are gaps in position (diff) | |
| download | discord.py-6cdda4a320c0aeabccd5837402527009075ed173.tar.xz discord.py-6cdda4a320c0aeabccd5837402527009075ed173.zip | |
Patch clean_prefix for new text editor
The new editor seems to force mentions to have ! even without a nick.
| -rw-r--r-- | discord/ext/commands/help.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index db066a36..ad8bd4e2 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -344,7 +344,8 @@ class HelpCommand: # consider this to be an *incredibly* strange use case. I'd rather go # for this common use case rather than waste performance for the # odd one. - return self.context.prefix.replace(user.mention, '@' + user.display_name) + pattern = re.compile(r"<@!?%s>" % user.id) + return pattern.sub("@%s" % user.display_name, self.context.prefix) @property def invoked_with(self): |