Revert "[Feature] Components V2 (#3065)" (#3100)

This reverts commit ba78e0c1f0.
This commit is contained in:
Mihail Gribkov
2025-04-27 00:05:40 +03:00
committed by GitHub
parent ba78e0c1f0
commit d27bb49b2d
102 changed files with 692 additions and 2852 deletions

View File

@@ -2,14 +2,11 @@ using Newtonsoft.Json;
namespace Discord.API
{
internal class ButtonComponent : IInteractableComponent
internal class ButtonComponent : IMessageComponent
{
[JsonProperty("type")]
public ComponentType Type { get; set; }
[JsonProperty("id")]
public Optional<int> Id { get; set; }
[JsonProperty("style")]
public ButtonStyle Style { get; set; }
@@ -42,7 +39,6 @@ namespace Discord.API
Url = c.Url;
Disabled = c.IsDisabled;
SkuId = c.SkuId ?? Optional<ulong>.Unspecified;
Id = c.Id ?? Optional<int>.Unspecified;
if (c.Emote != null)
{
@@ -66,9 +62,6 @@ namespace Discord.API
}
[JsonIgnore]
string IInteractableComponent.CustomId => CustomId.GetValueOrDefault();
[JsonIgnore]
int? IMessageComponent.Id => Id.ToNullable();
string IMessageComponent.CustomId => CustomId.GetValueOrDefault();
}
}