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:
parent
47ca9b5029
commit
28359eac50
2 changed files with 17 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue