Skip to content

Commit

Permalink
/editwarn: Correctly log new warning information to mod log channel
Browse files Browse the repository at this point in the history
  • Loading branch information
FloatingMilkshake committed Oct 1, 2024
1 parent 1759162 commit d53ca4f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Commands/InteractionCommands/WarningInteractions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,16 @@ public async Task EditWarnSlashCommand(InteractionContext ctx,
else
{
await ctx.DeferAsync(ephemeral: !showPublic);


await EditWarning(user, warnId, ctx.User, reason);

await LogChannelHelper.LogMessageAsync("mod",
new DiscordMessageBuilder()
.WithContent($"{Program.cfgjson.Emoji.Information} Warning edited:" +
$"`{StringHelpers.Pad(warnId)}` (belonging to {user.Mention})")
.AddEmbed(await FancyWarnEmbedAsync(GetWarning(user.Id, warnId), true, userID: user.Id))
);

await EditWarning(user, warnId, ctx.User, reason);

await ctx.FollowUpAsync(new DiscordFollowupMessageBuilder().WithContent($"{Program.cfgjson.Emoji.Information} Successfully edited warning `{StringHelpers.Pad(warnId)}` (belonging to {user.Mention})")
.AddEmbed(await FancyWarnEmbedAsync(GetWarning(user.Id, warnId), userID: user.Id)));
}
Expand Down

0 comments on commit d53ca4f

Please sign in to comment.