From a128fd5492b9a5d80796f4bb8b3347fe3e75682f Mon Sep 17 00:00:00 2001 From: alyssa Date: Fri, 23 Aug 2024 04:24:25 +0900 Subject: [PATCH] fix(bot): properly cancel dispatch prompt --- PluralKit.Bot/Commands/Api.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PluralKit.Bot/Commands/Api.cs b/PluralKit.Bot/Commands/Api.cs index 568250c4..0f612f40 100644 --- a/PluralKit.Bot/Commands/Api.cs +++ b/PluralKit.Bot/Commands/Api.cs @@ -150,7 +150,8 @@ public class Api + "\n\n**Please review the security requirements at before continuing.**" + "\n\nWhen the server is correctly validating the token, click or reply 'yes' to continue." ); - await ctx.PromptYesNo(newToken, "Continue", matchFlag: false); + if (!await ctx.PromptYesNo(newToken, "Continue", matchFlag: false)) + throw Errors.GenericCancelled(); var status = await _dispatch.TestUrl(ctx.System.Uuid, newUrl, newToken); if (status != "OK")