Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion chiya/cogs/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ async def edit_log(self, ctx: discord.Interaction, id: int, note: str) -> None:
if not log:
return await embeds.send_error(ctx=ctx, description="Could not find a log with that ID!")

old_reason = log.display_reason

log.reason = note
db.session.commit()

Expand All @@ -135,7 +137,7 @@ async def edit_log(self, ctx: discord.Interaction, id: int, note: str) -> None:
embed.title = f"Edited log: {user.name}"
embed.description = f"Log #{id} for {user.mention} was updated by {ctx.user.mention}"
embed.color = discord.Color.green()
embed.add_field(name="Before:", value=log.display_reason, inline=False)
embed.add_field(name="Before:", value=old_reason, inline=False)
embed.add_field(name="After:", value=note, inline=False)
embed.set_thumbnail(url="https://i.imgur.com/A4c19BJ.png")

Expand Down
Loading