fix(aurora): figuring out why I can't get a role from an id
Some checks failed
Actions / Lint Code (Pylint) (push) Failing after 17s
Actions / Build Documentation (MkDocs) (push) Successful in 13s

This commit is contained in:
Seaswimmer 2024-02-02 12:09:45 -05:00
parent 7d2b71667a
commit ba5b128afc
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -375,7 +375,7 @@ class Aurora(commands.Cog):
moderation_type=f"addrole", moderation_type=f"addrole",
response=await interaction.original_response(), response=await interaction.original_response(),
duration=parsed_time, duration=parsed_time,
role=role role=role,
) )
await target.send(embed=embed) await target.send(embed=embed)
except discord.errors.HTTPException: except discord.errors.HTTPException:
@ -1081,10 +1081,10 @@ class Aurora(commands.Cog):
if case["role_id"] != 0: if case["role_id"] != 0:
role = interaction.guild.get_role(case["role_id"]) role = interaction.guild.get_role(case["role_id"])
if not role: if role is not None:
field_value += f"\n**Role:** Deleted Role ({case['role_id']})"
else:
field_value += f"\n**Role:** {role.mention}" field_value += f"\n**Role:** {role.mention}"
else:
field_value += f"\n**Role:** Deleted Role ({case['role_id']})"
if bool(case["resolved"]): if bool(case["resolved"]):
field_value += "\n**Resolved:** True" field_value += "\n**Resolved:** True"