fix(aurora): fixing user dm messages in addrole
Some checks failed
Actions / Lint Code (Pylint) (push) Failing after 17s
Actions / Build Documentation (MkDocs) (push) Successful in 12s

This commit is contained in:
SeaswimmerTheFsh 2024-02-02 12:05:05 -05:00
parent 21dabccb48
commit 7d2b71667a
Signed by: cswimr
GPG key ID: B8953EC01E5C4063
2 changed files with 26 additions and 6 deletions

View file

@ -372,9 +372,10 @@ class Aurora(commands.Cog):
guild=interaction.guild,
moderator=interaction.user,
reason=reason,
moderation_type=f"`{role.name}` role",
moderation_type=f"addrole",
response=await interaction.original_response(),
duration=parsed_time,
role=role
)
await target.send(embed=embed)
except discord.errors.HTTPException:
@ -1078,6 +1079,13 @@ class Aurora(commands.Cog):
f"\n**Timestamp:** <t:{case['timestamp']}> | <t:{case['timestamp']}:R>"
)
if case["role_id"] != 0:
role = interaction.guild.get_role(case["role_id"])
if not role:
field_value += f"\n**Role:** Deleted Role ({case['role_id']})"
else:
field_value += f"\n**Role:** {role.mention}"
if bool(case["resolved"]):
field_value += "\n**Resolved:** True"