fix(moderation): case now uses fetch_user instead of get_user
Some checks failed
Pylint / Pylint (push) Failing after 1m12s

This commit is contained in:
Seaswimmer 2023-10-05 13:04:44 -04:00
parent c783f4032a
commit 8eb4039c64
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -375,11 +375,11 @@ class Moderation(commands.Cog):
"expired": result[10]
}
try:
target = interaction.client.get_user(case["target_id"])
target = await interaction.client.fetch_user(case["target_id"])
except discord.errors.NotFound:
target = discord.User(id=case["target_id"], name="Deleted User", discriminator="0")
try:
moderator = interaction.client.get_user(case["moderator_id"])
moderator = await interaction.client.fetch_user(case["moderator_id"])
except discord.errors.NotFound:
moderator = discord.User(id=case["moderator_id"], name="Deleted User", discriminator="0")
target_name = target.name if target.discriminator == "0" else f"{target.name}#{target.discriminator}"