From ae6402eae97a4cf854c3dc82ce9a6e33747d03c9 Mon Sep 17 00:00:00 2001 From: d4n Date: Tue, 28 May 2024 17:17:51 -0500 Subject: [PATCH] Remove restriction on interactions for deferred updates --- src/InteractiveGuards.cs | 3 +-- src/InteractiveService.cs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/InteractiveGuards.cs b/src/InteractiveGuards.cs index 6a66a6c..fd48063 100644 --- a/src/InteractiveGuards.cs +++ b/src/InteractiveGuards.cs @@ -131,8 +131,7 @@ public static void ValidResponseType(InteractionResponseType responseType, [Call public static void ValidResponseType(InteractionResponseType responseType, IDiscordInteraction interaction, [CallerArgumentExpression(nameof(responseType))] string? parameterName = null) { - if (interaction is not IComponentInteraction && - responseType is InteractionResponseType.DeferredUpdateMessage or InteractionResponseType.UpdateMessage) + if (interaction is not IComponentInteraction && responseType is InteractionResponseType.UpdateMessage) { throw new ArgumentException($"Interaction response type {responseType} can only be used on component interactions.", parameterName); } diff --git a/src/InteractiveService.cs b/src/InteractiveService.cs index 5fc134b..a47c460 100644 --- a/src/InteractiveService.cs +++ b/src/InteractiveService.cs @@ -880,7 +880,6 @@ await interaction.RespondWithFilesAsync(attachments ?? Enumerable.Empty