From f1653b929d1e1096b1809a840179647805bb9d6f Mon Sep 17 00:00:00 2001 From: "slicedlime (Mikael Hedberg)" Date: Fri, 20 Dec 2019 20:37:36 +0100 Subject: [PATCH] Support 'User (mention)' style mentions used by recent client updates (#171) * Support 'User (mention)' style mentions. * Remove conditional that should no longer be needed. (from PR feedback) --- disco/bot/bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disco/bot/bot.py b/disco/bot/bot.py index 92c22f9..d354e29 100644 --- a/disco/bot/bot.py +++ b/disco/bot/bot.py @@ -313,8 +313,9 @@ class Bot(LoggingClass): if msg.guild: member = msg.guild.get_member(self.client.state.me) if member: - content = content.replace(member.user.mention_nickname, '', 1) + # Filter both the normal and nick mentions content = content.replace(member.user.mention, '', 1) + content = content.replace(member.user.mention_nickname, '', 1) else: content = content.replace(self.client.state.me.mention, '', 1) elif mention_everyone: