Initial commit, basic proxying working
This commit is contained in:
27
Myriad/Types/Application/Application.cs
Normal file
27
Myriad/Types/Application/Application.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record Application: ApplicationPartial
|
||||
{
|
||||
public string Name { get; init; }
|
||||
public string? Icon { get; init; }
|
||||
public string Description { get; init; }
|
||||
public string[]? RpcOrigins { get; init; }
|
||||
public bool BotPublic { get; init; }
|
||||
public bool BotRequireCodeGrant { get; init; }
|
||||
public User Owner { get; init; } // TODO: docs specify this is "partial", what does that mean
|
||||
public string Summary { get; init; }
|
||||
public string VerifyKey { get; init; }
|
||||
public ulong? GuildId { get; init; }
|
||||
public ulong? PrimarySkuId { get; init; }
|
||||
public string? Slug { get; init; }
|
||||
public string? CoverImage { get; init; }
|
||||
}
|
||||
|
||||
public record ApplicationPartial
|
||||
{
|
||||
public ulong Id { get; init; }
|
||||
public int Flags { get; init; }
|
||||
}
|
||||
}
|
13
Myriad/Types/Application/ApplicationCommand.cs
Normal file
13
Myriad/Types/Application/ApplicationCommand.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record ApplicationCommand
|
||||
{
|
||||
public ulong Id { get; init; }
|
||||
public ulong ApplicationId { get; init; }
|
||||
public string Name { get; init; }
|
||||
public string Description { get; init; }
|
||||
public ApplicationCommandOption[]? Options { get; init; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record ApplicationCommandInteractionData
|
||||
{
|
||||
public ulong Id { get; init; }
|
||||
public string Name { get; init; }
|
||||
public ApplicationCommandInteractionDataOption[] Options { get; init; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record ApplicationCommandInteractionDataOption
|
||||
{
|
||||
public string Name { get; init; }
|
||||
public object? Value { get; init; }
|
||||
public ApplicationCommandInteractionDataOption[]? Options { get; init; }
|
||||
}
|
||||
}
|
24
Myriad/Types/Application/ApplicationCommandOption.cs
Normal file
24
Myriad/Types/Application/ApplicationCommandOption.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record ApplicationCommandOption(ApplicationCommandOption.OptionType Type, string Name, string Description)
|
||||
{
|
||||
public enum OptionType
|
||||
{
|
||||
Subcommand = 1,
|
||||
SubcommandGroup = 2,
|
||||
String = 3,
|
||||
Integer = 4,
|
||||
Boolean = 5,
|
||||
User = 6,
|
||||
Channel = 7,
|
||||
Role = 8
|
||||
}
|
||||
|
||||
public bool Default { get; init; }
|
||||
public bool Required { get; init; }
|
||||
public Choice[]? Choices { get; init; }
|
||||
public ApplicationCommandOption[]? Options { get; init; }
|
||||
|
||||
public record Choice(string Name, object Value);
|
||||
}
|
||||
}
|
19
Myriad/Types/Application/Interaction.cs
Normal file
19
Myriad/Types/Application/Interaction.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record Interaction
|
||||
{
|
||||
public enum InteractionType
|
||||
{
|
||||
Ping = 1,
|
||||
ApplicationCommand = 2
|
||||
}
|
||||
|
||||
public ulong Id { get; init; }
|
||||
public InteractionType Type { get; init; }
|
||||
public ApplicationCommandInteractionData? Data { get; init; }
|
||||
public ulong GuildId { get; init; }
|
||||
public ulong ChannelId { get; init; }
|
||||
public GuildMember Member { get; init; }
|
||||
public string Token { get; init; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Myriad.Rest.Types;
|
||||
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record InteractionApplicationCommandCallbackData
|
||||
{
|
||||
public bool? Tts { get; init; }
|
||||
public string Content { get; init; }
|
||||
public Embed[]? Embeds { get; init; }
|
||||
public AllowedMentions? AllowedMentions { get; init; }
|
||||
public Message.MessageFlags Flags { get; init; }
|
||||
}
|
||||
}
|
17
Myriad/Types/Application/InteractionResponse.cs
Normal file
17
Myriad/Types/Application/InteractionResponse.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Myriad.Types
|
||||
{
|
||||
public record InteractionResponse
|
||||
{
|
||||
public enum ResponseType
|
||||
{
|
||||
Pong = 1,
|
||||
Acknowledge = 2,
|
||||
ChannelMessage = 3,
|
||||
ChannelMessageWithSource = 4,
|
||||
AckWithSource = 5
|
||||
}
|
||||
|
||||
public ResponseType Type { get; init; }
|
||||
public InteractionApplicationCommandCallbackData? Data { get; init; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user