mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
feat(bot): initial ComponentsV2 implementation
This commit is contained in:
parent
695d1debf2
commit
517d4d9b56
12 changed files with 401 additions and 67 deletions
13
Myriad/Types/Component/ComponentMedia.cs
Normal file
13
Myriad/Types/Component/ComponentMedia.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
namespace Myriad.Types;
|
||||
|
||||
public record ComponentMedia
|
||||
{
|
||||
public string? Url { get; init; }
|
||||
}
|
||||
|
||||
public record ComponentMediaItem
|
||||
{
|
||||
public ComponentMedia Media { get; init; }
|
||||
public string? Description { get; init; }
|
||||
public bool Spoiler { get; init; } = false;
|
||||
}
|
||||
|
|
@ -3,5 +3,12 @@ namespace Myriad.Types;
|
|||
public enum ComponentType
|
||||
{
|
||||
ActionRow = 1,
|
||||
Button = 2
|
||||
Button = 2,
|
||||
StringSelect = 3,
|
||||
Section = 9,
|
||||
Text = 10,
|
||||
Thumbnail = 11,
|
||||
MediaGallery = 12,
|
||||
Separator = 14,
|
||||
Container = 17,
|
||||
}
|
||||
|
|
@ -5,9 +5,15 @@ public record MessageComponent
|
|||
public ComponentType Type { get; init; }
|
||||
public ButtonStyle? Style { get; set; }
|
||||
public string? Label { get; init; }
|
||||
public string? Content { get; init; }
|
||||
public Emoji? Emoji { get; init; }
|
||||
public string? CustomId { get; init; }
|
||||
public string? Url { get; init; }
|
||||
public bool? Disabled { get; init; }
|
||||
public uint? AccentColor { get; init; }
|
||||
public ComponentMedia? Media { get; init; }
|
||||
public ComponentMediaItem[]? Items { get; init; }
|
||||
|
||||
public MessageComponent? Accessory { get; init; }
|
||||
public MessageComponent[]? Components { get; init; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue