This repository was archived by the owner on Apr 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fd9208
commit e6b1f96
Showing
11 changed files
with
278 additions
and
7 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/API/Discord.API/Models/Enums/Messages/ComponentType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Quarrel © 2022 | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Discord.API.Models.Enums.Messages | ||
{ | ||
public enum ComponentType | ||
{ | ||
ActionRow = 1, | ||
Button = 2, | ||
SelectMenu = 3, | ||
TextInput = 4 | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/API/Discord.API/Models/Enums/Messages/InterationType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Quarrel © 2022 | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Discord.API.Models.Enums.Messages | ||
{ | ||
public enum InterationType | ||
{ | ||
PING = 1, | ||
APPLICATION_COMMAND = 2, | ||
MESSAGE_COMPONENT = 3, | ||
APPLICATION_COMMAND_AUTOCOMPLETE = 4, | ||
MODAL_SUBMIT = 5, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Quarrel © 2022 | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Discord.API.Models.Enums.Messages | ||
{ | ||
public enum MessageFlags | ||
{ | ||
/// <summary> | ||
/// This message has been published to subscribed channels (via Channel Following) | ||
/// </summary> | ||
CROSSPOSTED = 0, | ||
|
||
/// <summary> | ||
/// This message originated from a message in another channel (via Channel Following) | ||
/// </summary> | ||
IS_CROSSPOST = 1, | ||
|
||
/// <summary> | ||
/// Do not include any embeds when serializing this message | ||
/// </summary> | ||
SUPPRESS_EMBEDS = 1 << 2, | ||
|
||
/// <summary> | ||
/// The source message for this crosspost has been deleted (via Channel Following) | ||
/// </summary> | ||
SOURCE_MESSAGE_DELETED = 1 << 3, | ||
|
||
/// <summary> | ||
/// This message came from the urgent message system | ||
/// </summary> | ||
URGENT = 1 << 4, | ||
|
||
/// <summary> | ||
/// This message has an associated thread, with the same id as the message | ||
/// </summary> | ||
HAS_THREAD = 1 << 5, | ||
|
||
/// <summary> | ||
/// This message is only visible to the user who invoked the Interaction | ||
/// </summary> | ||
EPHEMERAL = 1 << 6, | ||
|
||
/// <summary> | ||
/// This message is an Interaction Response and the bot is "thinking" | ||
/// </summary> | ||
LOADING = 1 << 7, | ||
|
||
/// <summary> | ||
/// This message failed to mention some roles and add their members to the thread | ||
/// </summary> | ||
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD = 1 << 8, | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
src/API/Discord.API/Models/Json/Applications/JsonApplication.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// Quarrel © 2022 | ||
|
||
using Discord.API.Models.Json.Users; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Discord.API.Models.Json.Applications | ||
{ | ||
internal class JsonApplication | ||
{ | ||
[JsonPropertyName("id"), JsonNumberHandling(Constants.ReadWriteAsString)] | ||
public ulong Id { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("icon")] | ||
public string? Icon { get; set; } | ||
|
||
[JsonPropertyName("description")] | ||
public string Description { get; set; } | ||
|
||
[JsonPropertyName("rpc_origins")] | ||
public List<string>? RpcOrigins { get; set; } | ||
|
||
[JsonPropertyName("bot_public")] | ||
public bool BotPublic { get; set; } | ||
|
||
[JsonPropertyName("bot_require_code_grant")] | ||
public bool BotRequireCodeGrant { get; set; } | ||
|
||
[JsonPropertyName("terms_of_service_url")] | ||
public string? TermsOfServiceUrl { get; set; } | ||
|
||
[JsonPropertyName("privacy_policy_url")] | ||
public string? PrivacyPolicyUrl { get; set; } | ||
|
||
[JsonPropertyName("owner")] | ||
public JsonUser? Owner { get; set; } | ||
|
||
[JsonPropertyName("verify_key")] | ||
public string VerifyKey { get; set; } | ||
|
||
/* | ||
[JsonPropertyName("team")] | ||
public JsonTeam? Team { get; set; } | ||
*/ | ||
|
||
[JsonPropertyName("guild_id"), JsonNumberHandling(Constants.ReadWriteAsString)] | ||
public ulong? GuildId { get; set; } | ||
|
||
[JsonPropertyName("primary_sku_id"), JsonNumberHandling(Constants.ReadWriteAsString)] | ||
public ulong? PrimarySkuId { get; set; } | ||
|
||
[JsonPropertyName("slug")] | ||
public string? Slug { get; set; } | ||
|
||
[JsonPropertyName("cover_image")] | ||
public string? CoverImage { get; set; } | ||
|
||
[JsonPropertyName("flags")] | ||
public int? Flags { get; set; } | ||
|
||
[JsonPropertyName("tags")] | ||
public List<string>? Tags { get; set; } | ||
|
||
/* | ||
[JsonPropertyName("install_params")] | ||
public JsonInstallParams? InstallParams { get; set; } | ||
*/ | ||
|
||
[JsonPropertyName("custom_install_url")] | ||
public string? CustomInstallUrl { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Quarrel © 2022 | ||
|
||
using Discord.API.Models.Enums.Messages; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Discord.API.Models.Json.Messages | ||
{ | ||
internal class JsonComponent | ||
{ | ||
[JsonPropertyName("type")] | ||
public ComponentType Type { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/API/Discord.API/Models/Json/Messages/JsonMessageComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Quarrel © 2022 | ||
|
||
using Discord.API.Models.Enums.Messages; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Discord.API.Models.Json.Messages | ||
{ | ||
internal class JsonMessageComponent | ||
{ | ||
[JsonPropertyName("type")] | ||
public ComponentType Type { get; set; } | ||
|
||
[JsonPropertyName("components")] | ||
public List<JsonComponent> Components { get; set; } | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/API/Discord.API/Models/Json/Messages/JsonMessageInteraction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Quarrel © 2022 | ||
|
||
using Discord.API.Models.Enums.Messages; | ||
using Discord.API.Models.Json.Users; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Discord.API.Models.Json.Messages | ||
{ | ||
internal class JsonMessageInteraction | ||
{ | ||
[JsonPropertyName("id"), JsonNumberHandling(Constants.ReadWriteAsString)] | ||
public ulong Id { get; set; } | ||
|
||
[JsonPropertyName("type")] | ||
public InterationType Type { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("user")] | ||
public JsonUser User { get; set; } | ||
|
||
[JsonPropertyName("member")] | ||
public JsonGuildMember? Mmber { get; set; } | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/API/Discord.API/Models/Json/Messages/JsonMessageStickerItem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Quarrel © 2022 | ||
|
||
using Discord.API.Models.Enums.Stickers; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Discord.API.Models.Json.Messages | ||
{ | ||
internal class JsonMessageStickerItem | ||
{ | ||
[JsonPropertyName("id"), JsonNumberHandling(Constants.ReadWriteAsString)] | ||
public ulong Id { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("format_type")] | ||
public StickerFormatType FormatType { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters