diff options
author | 2021-08-23 19:04:03 +0200 | |
---|---|---|
committer | 2021-08-23 19:04:03 +0200 | |
commit | f640c5f5e02d92135f56ca809fab4188a957d07d (patch) | |
tree | 80f76f7f4c1c5d893fc5842631dcbc7692421441 | |
parent | Update reminders command to use `UserMentionOrID` instead of `discord.Member`... (diff) | |
parent | Escape markdown in user's name for `!user` command (diff) |
Merge pull request #1771 from python-discord/TizzySaurus-patch-1
Escape markdown in user's name for `!user` command
-rw-r--r-- | bot/exts/info/information.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py index a9ea403f7..8bef6a8cd 100644 --- a/bot/exts/info/information.py +++ b/bot/exts/info/information.py @@ -8,6 +8,7 @@ from typing import Any, DefaultDict, Mapping, Optional, Tuple, Union import rapidfuzz from discord import AllowedMentions, Colour, Embed, Guild, Message, Role from discord.ext.commands import BucketType, Cog, Context, Paginator, command, group, has_any_role +from discord.utils import escape_markdown from bot import constants from bot.api import ResponseCodeError @@ -244,6 +245,7 @@ class Information(Cog): name = str(user) if on_server and user.nick: name = f"{user.nick} ({name})" + name = escape_markdown(name) if user.public_flags.verified_bot: name += f" {constants.Emojis.verified_bot}" |