Add confirmation when editing a message from DMs

Closes #373.
This commit is contained in:
spiral 2021-07-17 20:39:12 -04:00 committed by GitHub
parent 1f2b9f998d
commit 9d344a4ef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);