fix: don't try deleting pk;msg -delete
message in DMs
This commit is contained in:
parent
42422f475b
commit
2973325e12
@ -137,7 +137,10 @@ namespace PluralKit.Bot
|
|||||||
{
|
{
|
||||||
if (message.System.Id != ctx.System.Id)
|
if (message.System.Id != ctx.System.Id)
|
||||||
throw new PKError("You can only delete your own messages.");
|
throw new PKError("You can only delete your own messages.");
|
||||||
|
|
||||||
await ctx.Rest.DeleteMessage(message.Message.Channel, message.Message.Mid);
|
await ctx.Rest.DeleteMessage(message.Message.Channel, message.Message.Mid);
|
||||||
|
|
||||||
|
if (ctx.Guild != null)
|
||||||
await ctx.Rest.DeleteMessage(ctx.Message);
|
await ctx.Rest.DeleteMessage(ctx.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user