Skip to content

Commit

Permalink
fix vouch comment update
Browse files Browse the repository at this point in the history
  • Loading branch information
WhatCats committed Dec 17, 2024
1 parent 82bc38f commit 98f50b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/council/vouches/vouch-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ async function addVouch(interaction: ChatInputCommandInteraction, worth: number)

const vouch = await Vouch.findOneAndUpdate(
{ givenAt: { $lte: DateTime.now().plus({ days: 7 }).toJSDate() }, ...filter },
{ ...filter, worth, comment, givenAt: new Date() },
{ ...filter, worth, givenAt: new Date(), ...(comment ? { comment } : { $unset: { comment: "" } }) },
{ upsert: true, new: true },
)

Expand Down

0 comments on commit 98f50b9

Please sign in to comment.