diff --git a/PluralKit.Bot/Commands/Message.cs b/PluralKit.Bot/Commands/Message.cs index 6aed315a..93be6c14 100644 --- a/PluralKit.Bot/Commands/Message.cs +++ b/PluralKit.Bot/Commands/Message.cs @@ -137,8 +137,11 @@ namespace PluralKit.Bot { if (message.System.Id != ctx.System.Id) throw new PKError("You can only delete your own messages."); + await ctx.Rest.DeleteMessage(message.Message.Channel, message.Message.Mid); - await ctx.Rest.DeleteMessage(ctx.Message); + + if (ctx.Guild != null) + await ctx.Rest.DeleteMessage(ctx.Message); return; } if (ctx.Match("author") || ctx.MatchFlag("author"))