1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-15 02:23:13 +00:00

fix audit log reason never showing username

This commit is contained in:
io 2021-07-08 07:06:04 +00:00
parent 47ca9b5029
commit 28359eac50
2 changed files with 17 additions and 20 deletions

View file

@ -19,11 +19,8 @@ import asyncio
import discord
def format_user(bot, id, *, mention=False):
"""Format a user ID for human readable display."""
user = bot.get_user(id)
if user is None:
return f'Unknown user with ID {id}'
def format_user(user, *, mention=False):
"""Format a user object for audit log purposes."""
# not mention: @null byte#8191 (140516693242937345)
# mention: <@140516693242937345> (null byte#8191)
# this allows people to still see the username and discrim