mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): ComponentsV2 system/member/group cards
Some checks are pending
Build and push Docker image / .net docker build (push) Waiting to run
.net checks / run .net tests (push) Waiting to run
.net checks / dotnet-format (push) Waiting to run
Build and push Rust service Docker images / rust docker build (push) Waiting to run
rust checks / cargo fmt (push) Waiting to run
Some checks are pending
Build and push Docker image / .net docker build (push) Waiting to run
.net checks / run .net tests (push) Waiting to run
.net checks / dotnet-format (push) Waiting to run
Build and push Rust service Docker images / rust docker build (push) Waiting to run
rust checks / cargo fmt (push) Waiting to run
This commit is contained in:
parent
695d1debf2
commit
fbf51b41c1
20 changed files with 600 additions and 18 deletions
|
|
@ -9,6 +9,7 @@ public record MessageRequest
|
|||
public bool Tts { get; set; }
|
||||
public AllowedMentions? AllowedMentions { get; set; }
|
||||
public Embed[]? Embeds { get; set; }
|
||||
public Message.MessageFlags Flags { get; set; }
|
||||
public MessageComponent[]? Components { get; set; }
|
||||
public Message.Reference? MessageReference { get; set; }
|
||||
}
|
||||
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; }
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@ public record Message
|
|||
Ephemeral = 1 << 6,
|
||||
SuppressNotifications = 1 << 12,
|
||||
VoiceMessage = 1 << 13,
|
||||
IsComponentsV2 = 1 << 15,
|
||||
}
|
||||
|
||||
public enum MessageType
|
||||
|
|
@ -73,8 +74,6 @@ public record Message
|
|||
|
||||
public MessagePoll? Poll { get; init; }
|
||||
|
||||
// public MessageComponent[]? Components { get; init; }
|
||||
|
||||
public record Reference(ulong? GuildId, ulong? ChannelId, ulong? MessageId);
|
||||
|
||||
public record MessageActivity(int Type, string PartyId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue