diff --git a/payphone/bot.py b/payphone/bot.py index e0c1f2c..c5cd37b 100644 --- a/payphone/bot.py +++ b/payphone/bot.py @@ -215,14 +215,19 @@ class Payphone(commands.AutoShardedBot): "@everyone", f"@{constants.INVISIBLE_CHARACTER}everyone" ).replace("@here", f"@{constants.INVISIBLE_CHARACTER}here") - for mention in message.mentions + message.role_mentions: + for mention in message.mentions: content = content.replace( f"<@{mention.id}>", f"@**{mention.display_name}**" ) + for mention in message.role_mentions: + content = content.replace( + f"<@{mention.id}>", f"@**{mention.name}**" + ) + for mention in message.channel_mentions: content = content.replace( - f"<@{mention.id}>", f"#**{mention.display_name}**" + f"<@{mention.id}>", f"#**{mention.name}**" ) return content