fix(bot): make deletion ID checks accept hyphens/caps

This commit is contained in:
Iris System 2024-05-01 21:13:12 +12:00
parent eccab602d5
commit 7965e15282
4 changed files with 20 additions and 15 deletions

View file

@ -816,8 +816,8 @@ public class MemberEdit
ctx.CheckSystem().CheckOwnMember(target);
await ctx.Reply(
$"{Emojis.Warn} Are you sure you want to delete \"{target.NameFor(ctx)}\"? If so, reply to this message with the member's ID (`{target.Hid}`). __***This cannot be undone!***__");
if (!await ctx.ConfirmWithReply(target.Hid)) throw Errors.MemberDeleteCancelled;
$"{Emojis.Warn} Are you sure you want to delete \"{target.NameFor(ctx)}\"? If so, reply to this message with the member's ID (`{target.DisplayHid(ctx.Config)}`). __***This cannot be undone!***__");
if (!await ctx.ConfirmWithReply(target.Hid, treatAsHid: true)) throw Errors.MemberDeleteCancelled;
await ctx.Repository.DeleteMember(target.Id);