Patch clean_prefix for new text editor
The new editor seems to force mentions to have ! even without a nick.
This commit is contained in:
parent
e91675291e
commit
6cdda4a320
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user