remove rest of the parsing in csharp bot

This commit is contained in:
dusk 2025-10-08 03:26:40 +00:00
parent 15ffd16c01
commit 479e0a59b5
No known key found for this signature in database
35 changed files with 242 additions and 409 deletions

View file

@ -16,17 +16,17 @@ namespace PluralKit.Bot;
public static class ContextUtils
{
public static async Task<bool> ConfirmClear(this Context ctx, string toClear, bool? confirmYes = null)
public static async Task<bool> ConfirmClear(this Context ctx, string toClear, bool confirmYes)
{
if (!await ctx.PromptYesNo($"{Emojis.Warn} Are you sure you want to clear {toClear}?", "Clear", null, true, confirmYes))
if (!await ctx.PromptYesNo($"{Emojis.Warn} Are you sure you want to clear {toClear}?", "Clear", flagValue: confirmYes))
throw Errors.GenericCancelled();
return true;
}
public static async Task<bool> PromptYesNo(this Context ctx, string msgString, string acceptButton,
User user = null, bool matchFlag = true, bool? flagValue = null)
User user = null, bool matchFlag = true, bool flagValue = false)
{
if (matchFlag && (flagValue ?? ctx.MatchFlag("y", "yes"))) return true;
if (matchFlag && flagValue) return true;
var prompt = new YesNoPrompt(ctx)
{