Skip to content

Commit 6a849ed

Browse files
committed
Add mute duration to reason in response embed
1 parent 090eb12 commit 6a849ed

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

techsupport_bot/commands/moderator.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,14 @@ async def handle_mute_user(
354354
guild=interaction.guild,
355355
target=target,
356356
)
357-
embed = generate_response_embed(user=target, action="mute", reason=reason)
357+
358+
muted_until_timestamp = (
359+
f"<t:{int((datetime.now() + delta_duration).timestamp())}>"
360+
)
361+
362+
full_reason = f"{reason} (muted until {muted_until_timestamp})"
363+
364+
embed = generate_response_embed(user=target, action="mute", reason=full_reason)
358365
await interaction.response.send_message(content=target.mention, embed=embed)
359366

360367
@app_commands.checks.has_permissions(moderate_members=True)

0 commit comments

Comments
 (0)