diff options
| author | jack1142 <[email protected]> | 2020-05-06 23:57:57 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-05-07 02:30:24 -0400 |
| commit | 79276da17eeb5e96f3b9f2732e32ddf859f858f2 (patch) | |
| tree | 10b31e02e8771eb7928edd0562d00e4ba5786d21 | |
| parent | [tasks] Fix tasks decorators being discarded (diff) | |
| download | discord.py-79276da17eeb5e96f3b9f2732e32ddf859f858f2.tar.xz discord.py-79276da17eeb5e96f3b9f2732e32ddf859f858f2.zip | |
Escape backslashes in display name in `clean_prefix`
| -rw-r--r-- | discord/ext/commands/help.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 72992de9..226e5f6a 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -345,7 +345,7 @@ class HelpCommand: # for this common use case rather than waste performance for the # odd one. pattern = re.compile(r"<@!?%s>" % user.id) - return pattern.sub("@%s" % user.display_name, self.context.prefix) + return pattern.sub("@%s" % user.display_name.replace('\\', r'\\'), self.context.prefix) @property def invoked_with(self): |