From 9d344a4ef90c4cc7482a68060d2257795eb47d91 Mon Sep 17 00:00:00 2001 From: spiral Date: Sat, 17 Jul 2021 20:39:12 -0400 Subject: [PATCH] Add confirmation when editing a message from DMs Closes #373. --- PluralKit.Bot/Commands/MessageEdit.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Commands/MessageEdit.cs b/PluralKit.Bot/Commands/MessageEdit.cs index 4154b1be..85987e97 100644 --- a/PluralKit.Bot/Commands/MessageEdit.cs +++ b/PluralKit.Bot/Commands/MessageEdit.cs @@ -49,6 +49,9 @@ namespace PluralKit.Bot { await _webhookExecutor.EditWebhookMessage(msg.Channel, msg.Mid, newContent); + if (ctx.Guild == null) + await _rest.CreateReaction(ctx.Channel.Id, ctx.Message.Id, new() { Name = Emojis.Success }); + if (ctx.BotPermissions.HasFlag(PermissionSet.ManageMessages)) await _rest.DeleteMessage(ctx.Channel.Id, ctx.Message.Id); @@ -97,4 +100,4 @@ namespace PluralKit.Bot return lastMessage; } } -} \ No newline at end of file +}