Skip to content

Commit

Permalink
Log usage of /transfer_warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisa committed Aug 13, 2021
1 parent 85f04ee commit 3385b09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Modules/SlashCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public async Task WarningsSlashCommand(InteractionContext ctx,
public async Task TransferWarningsSlashCommand(InteractionContext ctx,
[Option("source_user", "The user currently holding the warnings.")] DiscordUser sourceUser,
[Option("target_user", "The user recieving the warnings.")] DiscordUser targetUser,
[Option("force_override", "DESTRUCTIVE OPERATION: Whether to OVERRIDE and REMOVE the target users existing warnings.")] bool forceOverride = false
[Option("force_override", "DESTRUCTIVE OPERATION: Whether to OVERRIDE and DELETE the target users existing warnings.")] bool forceOverride = false
)
{
var sourceWarnings = await Program.db.HashGetAllAsync(sourceUser.Id.ToString());
Expand All @@ -250,6 +250,7 @@ await ctx.RespondAsync($"{Program.cfgjson.Emoji.Warning} **CAUTION**: The target
await Program.db.KeyRenameAsync(sourceUser.Id.ToString(), targetUser.Id.ToString());
}
await ctx.RespondAsync($"{Program.cfgjson.Emoji.Success} Successully transferred warnings from {sourceUser.Mention} to {targetUser.Mention}!");
await Program.logChannel.SendMessageAsync($"{Program.cfgjson.Emoji.Information} Warnings from {sourceUser.Mention} were transferred to {targetUser.Mention} by `{ctx.User.Username}#{ctx.User.Discriminator}`", Warnings.GenerateWarningsEmbed(targetUser));
}

[ContextMenu(ApplicationCommandType.UserContextMenu, "Show Warnings")]
Expand Down

0 comments on commit 3385b09

Please sign in to comment.