mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Add basic interactivity framework
This commit is contained in:
parent
b894a9f86e
commit
4bd2d06b0b
12 changed files with 245 additions and 27 deletions
|
|
@ -1,6 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Myriad.Types
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record ApplicationCommand
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
public string? Name { get; init; }
|
||||
public ApplicationCommandInteractionDataOption[]? Options { get; init; }
|
||||
public string? CustomId { get; init; }
|
||||
public MessageComponent.ComponentType? ComponentType { get; init; }
|
||||
public ComponentType? ComponentType { get; init; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
using Myriad.Rest.Types;
|
||||
using Myriad.Rest.Types;
|
||||
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record InteractionApplicationCommandCallbackData
|
||||
{
|
||||
public bool? Tts { get; init; }
|
||||
public string Content { get; init; }
|
||||
public string? Content { get; init; }
|
||||
public Embed[]? Embeds { get; init; }
|
||||
public AllowedMentions? AllowedMentions { get; init; }
|
||||
public Message.MessageFlags Flags { get; init; }
|
||||
public MessageComponent[]? Components { get; init; }
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
@ -10,20 +10,5 @@ namespace Myriad.Types
|
|||
public string? Url { get; init; }
|
||||
public bool? Disabled { get; init; }
|
||||
public MessageComponent[]? Components { get; init; }
|
||||
|
||||
public enum ComponentType
|
||||
{
|
||||
ActionRow = 1,
|
||||
Button = 2
|
||||
}
|
||||
|
||||
public enum ButtonStyle
|
||||
{
|
||||
Primary = 1,
|
||||
Secondary = 2,
|
||||
Success = 3,
|
||||
Danger = 4,
|
||||
Link = 5
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Mail;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using Myriad.Utils;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue