mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
Add basic interactivity framework
This commit is contained in:
parent
b894a9f86e
commit
4bd2d06b0b
12 changed files with 245 additions and 27 deletions
11
Myriad/Types/Component/ButtonStyle.cs
Normal file
11
Myriad/Types/Component/ButtonStyle.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
namespace Myriad.Types
|
||||
{
|
||||
public enum ButtonStyle
|
||||
{
|
||||
Primary = 1,
|
||||
Secondary = 2,
|
||||
Success = 3,
|
||||
Danger = 4,
|
||||
Link = 5
|
||||
}
|
||||
}
|
||||
8
Myriad/Types/Component/ComponentType.cs
Normal file
8
Myriad/Types/Component/ComponentType.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace Myriad.Types
|
||||
{
|
||||
public enum ComponentType
|
||||
{
|
||||
ActionRow = 1,
|
||||
Button = 2
|
||||
}
|
||||
}
|
||||
14
Myriad/Types/Component/MessageComponent.cs
Normal file
14
Myriad/Types/Component/MessageComponent.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
namespace Myriad.Types
|
||||
{
|
||||
public record MessageComponent
|
||||
{
|
||||
public ComponentType Type { get; init; }
|
||||
public ButtonStyle? Style { get; init; }
|
||||
public string? Label { get; init; }
|
||||
public Emoji? Emoji { get; init; }
|
||||
public string? CustomId { get; init; }
|
||||
public string? Url { get; init; }
|
||||
public bool? Disabled { get; init; }
|
||||
public MessageComponent[]? Components { get; init; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue