diff options
author | 2020-09-23 15:12:33 +0100 | |
---|---|---|
committer | 2020-09-23 15:12:33 +0100 | |
commit | 4e49b9ffd7a359b8b6139e5cc6fc30c9e631b77d (patch) | |
tree | 69ad3144c54b6081e1cc04604f393b4e868c40a9 | |
parent | Clean: fix mention in mod log message (diff) |
Update format_user to remove username and add ID
-rw-r--r-- | bot/utils/messages.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bot/utils/messages.py b/bot/utils/messages.py index 74956ed24..9cc0d8a34 100644 --- a/bot/utils/messages.py +++ b/bot/utils/messages.py @@ -9,7 +9,6 @@ from typing import List, Optional, Sequence, Union import discord from discord.errors import HTTPException from discord.ext.commands import Context -from discord.utils import escape_markdown from bot.constants import Emojis, NEGATIVE_REPLIES @@ -142,6 +141,5 @@ async def send_denial(ctx: Context, reason: str) -> None: def format_user(user: discord.abc.User) -> str: - """Return a string for `user` which has their mention and name#discriminator.""" - name = escape_markdown(str(user)) - return f"{user.mention} ({name})" + """Return a string for `user` which has their mention and ID.""" + return f"{user.mention} (`{user.id}`)" |