From b55447fe1d6b03b399a016250e398179ee633365 Mon Sep 17 00:00:00 2001 From: Misha133 Date: Thu, 3 Nov 2022 15:37:45 +0300 Subject: [PATCH] remove redundant code --- .../Interactions/Modals/RestModalData.cs | 25 +------------------ .../Interaction/Modals/SocketModalData.cs | 2 +- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Interactions/Modals/RestModalData.cs b/src/Discord.Net.Rest/Entities/Interactions/Modals/RestModalData.cs index 153301ab1..697c58ed2 100644 --- a/src/Discord.Net.Rest/Entities/Interactions/Modals/RestModalData.cs +++ b/src/Discord.Net.Rest/Entities/Interactions/Modals/RestModalData.cs @@ -10,7 +10,7 @@ namespace Discord.Rest /// /// Represents data sent from a Interaction. /// - public class RestModalData : IComponentInteractionData, IModalInteractionData + public class RestModalData : IModalInteractionData { /// public string CustomId { get; } @@ -20,29 +20,6 @@ namespace Discord.Rest /// public IReadOnlyCollection Components { get; } - /// - public ComponentType Type => throw new NotSupportedException("Modals do not have a component type."); - - /// - public IReadOnlyCollection Values - => throw new NotSupportedException("Modal interactions do not have values!"); - - /// - public IReadOnlyCollection Channels - => throw new NotSupportedException("Modal interactions do not have channels!"); - - /// - public IReadOnlyCollection Users - => throw new NotSupportedException("Modal interactions do not have users!"); - - /// - public IReadOnlyCollection Roles - => throw new NotSupportedException("Modal interactions do not have roles!"); - - /// - public string Value - => throw new NotSupportedException("Modal interactions do not have value!"); - IReadOnlyCollection IModalInteractionData.Components => Components; internal RestModalData(Model model) diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Modals/SocketModalData.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Modals/SocketModalData.cs index df8be2fe8..1705433b0 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Modals/SocketModalData.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Modals/SocketModalData.cs @@ -10,7 +10,7 @@ namespace Discord.WebSocket /// /// Represents data sent from a . /// - public class SocketModalData : IDiscordInteractionData, IModalInteractionData + public class SocketModalData : IModalInteractionData { /// /// Gets the 's Custom Id.