From 2b1581582523bb105203f96823a45380425bb41c Mon Sep 17 00:00:00 2001 From: spiral Date: Fri, 2 Jul 2021 06:35:25 -0400 Subject: [PATCH] listen for text response in YesNoPrompt interactive --- .../Rest/Types/Requests/MessageEditRequest.cs | 3 + PluralKit.Bot/Interactive/BaseInteractive.cs | 27 +++++--- PluralKit.Bot/Interactive/YesNoPrompt.cs | 68 ++++++++++++++++++- 3 files changed, 88 insertions(+), 10 deletions(-) diff --git a/Myriad/Rest/Types/Requests/MessageEditRequest.cs b/Myriad/Rest/Types/Requests/MessageEditRequest.cs index bf217c83..3e74f7f9 100644 --- a/Myriad/Rest/Types/Requests/MessageEditRequest.cs +++ b/Myriad/Rest/Types/Requests/MessageEditRequest.cs @@ -18,5 +18,8 @@ namespace Myriad.Rest.Types.Requests [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] public Optional AllowedMentions { get; init; } + + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] + public Optional Components { get; init; } } } \ No newline at end of file diff --git a/PluralKit.Bot/Interactive/BaseInteractive.cs b/PluralKit.Bot/Interactive/BaseInteractive.cs index 36eb9f57..e5917887 100644 --- a/PluralKit.Bot/Interactive/BaseInteractive.cs +++ b/PluralKit.Bot/Interactive/BaseInteractive.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using Autofac; +using Myriad.Rest.Types; using Myriad.Rest.Types.Requests; using Myriad.Types; @@ -15,10 +16,11 @@ namespace PluralKit.Bot.Interactive { public abstract class BaseInteractive { - private readonly Context _ctx; - private readonly List