mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
fix(bot): make deletion ID checks accept hyphens/caps
This commit is contained in:
parent
eccab602d5
commit
7965e15282
4 changed files with 20 additions and 15 deletions
|
|
@ -574,10 +574,10 @@ public class Groups
|
|||
ctx.CheckOwnGroup(target);
|
||||
|
||||
await ctx.Reply(
|
||||
$"{Emojis.Warn} Are you sure you want to delete this group? If so, reply to this message with the group's ID (`{target.Hid}`).\n**Note: this action is permanent.**");
|
||||
if (!await ctx.ConfirmWithReply(target.Hid))
|
||||
$"{Emojis.Warn} Are you sure you want to delete this group? If so, reply to this message with the group's ID (`{target.DisplayHid(ctx.Config)}`).\n**Note: this action is permanent.**");
|
||||
if (!await ctx.ConfirmWithReply(target.Hid, treatAsHid: true))
|
||||
throw new PKError(
|
||||
$"Group deletion cancelled. Note that you must reply with your group ID (`{target.Hid}`) *verbatim*.");
|
||||
$"Group deletion cancelled. Note that you must reply with your group ID (`{target.DisplayHid(ctx.Config)}`) *verbatim*.");
|
||||
|
||||
await ctx.Repository.DeleteGroup(target.Id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue