fix(moderation): case now uses fetch_user instead of get_user
Some checks failed
Pylint / Pylint (push) Failing after 1m12s
Some checks failed
Pylint / Pylint (push) Failing after 1m12s
This commit is contained in:
parent
c783f4032a
commit
8eb4039c64
1 changed files with 2 additions and 2 deletions
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue