| @@ -1,4 +1,3 @@ | |||
| using Newtonsoft.Json.Linq; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Diagnostics; | |||
| @@ -19,7 +18,7 @@ namespace Discord | |||
| /// Gets a <see cref="OverwritePermissions" /> that grants all permissions for the given channel. | |||
| /// </summary> | |||
| /// <exception cref="ArgumentException">Unknown channel type.</exception> | |||
| public static OverwritePermissions AllowAll(IChannel channel) | |||
| public static OverwritePermissions AllowAll(IChannel channel) | |||
| => new OverwritePermissions(ChannelPermissions.All(channel).RawValue, 0); | |||
| /// <summary> | |||
| /// Gets a <see cref="OverwritePermissions" /> that denies all permissions for the given channel. | |||
| @@ -116,24 +115,24 @@ namespace Discord | |||
| private OverwritePermissions(ulong allowValue, ulong denyValue, | |||
| PermValue? createInstantInvite = null, | |||
| PermValue? manageChannel = null, | |||
| PermValue? manageChannel = null, | |||
| PermValue? addReactions = null, | |||
| PermValue? viewChannel = null, | |||
| PermValue? sendMessages = null, | |||
| PermValue? sendTTSMessages = null, | |||
| PermValue? manageMessages = null, | |||
| PermValue? manageMessages = null, | |||
| PermValue? embedLinks = null, | |||
| PermValue? attachFiles = null, | |||
| PermValue? readMessageHistory = null, | |||
| PermValue? mentionEveryone = null, | |||
| PermValue? mentionEveryone = null, | |||
| PermValue? useExternalEmojis = null, | |||
| PermValue? connect = null, | |||
| PermValue? speak = null, | |||
| PermValue? muteMembers = null, | |||
| PermValue? muteMembers = null, | |||
| PermValue? deafenMembers = null, | |||
| PermValue? moveMembers = null, | |||
| PermValue? useVoiceActivation = null, | |||
| PermValue? manageRoles = null, | |||
| PermValue? manageRoles = null, | |||
| PermValue? manageWebhooks = null, | |||
| PermValue? prioritySpeaker = null, | |||
| PermValue? stream = null, | |||
| @@ -194,7 +193,7 @@ namespace Discord | |||
| PermValue viewChannel = PermValue.Inherit, | |||
| PermValue sendMessages = PermValue.Inherit, | |||
| PermValue sendTTSMessages = PermValue.Inherit, | |||
| PermValue manageMessages = PermValue.Inherit, | |||
| PermValue manageMessages = PermValue.Inherit, | |||
| PermValue embedLinks = PermValue.Inherit, | |||
| PermValue attachFiles = PermValue.Inherit, | |||
| PermValue readMessageHistory = PermValue.Inherit, | |||
| @@ -221,8 +220,8 @@ namespace Discord | |||
| PermValue useExternalStickers = PermValue.Inherit, | |||
| PermValue sendMessagesInThreads = PermValue.Inherit, | |||
| PermValue startEmbeddedActivities = PermValue.Inherit) | |||
| : this(0, 0, createInstantInvite, manageChannel, addReactions, viewChannel, sendMessages, sendTTSMessages, manageMessages, | |||
| embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, | |||
| : this(0, 0, createInstantInvite, manageChannel, addReactions, viewChannel, sendMessages, sendTTSMessages, manageMessages, | |||
| embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, | |||
| moveMembers, useVoiceActivation, manageRoles, manageWebhooks, prioritySpeaker, stream, useSlashCommands, useApplicationCommands, | |||
| requestToSpeak, manageThreads, createPublicThreads, createPrivateThreads, usePublicThreads, usePrivateThreads, useExternalStickers, | |||
| sendMessagesInThreads, startEmbeddedActivities) { } | |||
| @@ -238,11 +237,11 @@ namespace Discord | |||
| PermValue? viewChannel = null, | |||
| PermValue? sendMessages = null, | |||
| PermValue? sendTTSMessages = null, | |||
| PermValue? manageMessages = null, | |||
| PermValue? manageMessages = null, | |||
| PermValue? embedLinks = null, | |||
| PermValue? attachFiles = null, | |||
| PermValue? readMessageHistory = null, | |||
| PermValue? mentionEveryone = null, | |||
| PermValue? mentionEveryone = null, | |||
| PermValue? useExternalEmojis = null, | |||
| PermValue? connect = null, | |||
| PermValue? speak = null, | |||
| @@ -265,8 +264,8 @@ namespace Discord | |||
| PermValue? useExternalStickers = null, | |||
| PermValue? sendMessagesInThreads = null, | |||
| PermValue? startEmbeddedActivities = null) | |||
| => new OverwritePermissions(AllowValue, DenyValue, createInstantInvite, manageChannel, addReactions, viewChannel, sendMessages, sendTTSMessages, manageMessages, | |||
| embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, | |||
| => new OverwritePermissions(AllowValue, DenyValue, createInstantInvite, manageChannel, addReactions, viewChannel, sendMessages, sendTTSMessages, manageMessages, | |||
| embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, | |||
| moveMembers, useVoiceActivation, manageRoles, manageWebhooks, prioritySpeaker, stream, useSlashCommands, useApplicationCommands, | |||
| requestToSpeak, manageThreads, createPublicThreads, createPrivateThreads, usePublicThreads, usePrivateThreads, useExternalStickers, | |||
| sendMessagesInThreads, startEmbeddedActivities); | |||
| @@ -305,7 +304,7 @@ namespace Discord | |||
| } | |||
| public override string ToString() => $"Allow {AllowValue}, Deny {DenyValue}"; | |||
| private string DebuggerDisplay => | |||
| private string DebuggerDisplay => | |||
| $"Allow {string.Join(", ", ToAllowList())}, " + | |||
| $"Deny {string.Join(", ", ToDenyList())}"; | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Linq; | |||
| namespace Discord.API | |||
| { | |||
| internal class ActionRowComponent : IMessageComponent | |||
| { | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ComponentType Type { get; set; } | |||
| [JsonProperty("components")] | |||
| [JsonPropertyName("components")] | |||
| public IMessageComponent[] Components { get; set; } | |||
| internal ActionRowComponent() { } | |||
| @@ -1,17 +1,17 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class AllowedMentions | |||
| { | |||
| [JsonProperty("parse")] | |||
| [JsonPropertyName("parse")] | |||
| public Optional<string[]> Parse { get; set; } | |||
| // Roles and Users have a max size of 100 | |||
| [JsonProperty("roles")] | |||
| [JsonPropertyName("roles")] | |||
| public Optional<ulong[]> Roles { get; set; } | |||
| [JsonProperty("users")] | |||
| [JsonPropertyName("users")] | |||
| public Optional<ulong[]> Users { get; set; } | |||
| [JsonProperty("replied_user")] | |||
| [JsonPropertyName("replied_user")] | |||
| public Optional<bool> RepliedUser { get; set; } | |||
| } | |||
| } | |||
| @@ -1,36 +1,36 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Application | |||
| { | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty("rpc_origins")] | |||
| [JsonPropertyName("rpc_origins")] | |||
| public Optional<string[]> RPCOrigins { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("icon")] | |||
| [JsonPropertyName("icon")] | |||
| public string Icon { get; set; } | |||
| [JsonProperty("bot_public")] | |||
| [JsonPropertyName("bot_public")] | |||
| public bool IsBotPublic { get; set; } | |||
| [JsonProperty("bot_require_code_grant")] | |||
| [JsonPropertyName("bot_require_code_grant")] | |||
| public bool BotRequiresCodeGrant { get; set; } | |||
| [JsonProperty("install_params")] | |||
| [JsonPropertyName("install_params")] | |||
| public Optional<InstallParams> InstallParams { get; set; } | |||
| [JsonProperty("team")] | |||
| [JsonPropertyName("team")] | |||
| public Team Team { get; set; } | |||
| [JsonProperty("flags"), Int53] | |||
| [JsonPropertyName("flags"), Int53] | |||
| public Optional<ApplicationFlags> Flags { get; set; } | |||
| [JsonProperty("owner")] | |||
| [JsonPropertyName("owner")] | |||
| public Optional<User> Owner { get; set; } | |||
| [JsonProperty("tags")] | |||
| [JsonPropertyName("tags")] | |||
| public Optional<string[]> Tags { get; set; } | |||
| [JsonProperty("terms_of_service_url")] | |||
| [JsonPropertyName("terms_of_service_url")] | |||
| public string TermsOfService { get; set; } | |||
| [JsonProperty("privacy_policy_url")] | |||
| [JsonPropertyName("privacy_policy_url")] | |||
| public string PrivacyPolicy { get; set; } | |||
| } | |||
| } | |||
| @@ -1,48 +1,48 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Collections.Generic; | |||
| namespace Discord.API | |||
| { | |||
| internal class ApplicationCommand | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ApplicationCommandType Type { get; set; } = ApplicationCommandType.Slash; // defaults to 1 which is slash. | |||
| [JsonProperty("application_id")] | |||
| [JsonPropertyName("application_id")] | |||
| public ulong ApplicationId { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public Optional<ApplicationCommandOption[]> Options { get; set; } | |||
| [JsonProperty("default_permission")] | |||
| [JsonPropertyName("default_permission")] | |||
| public Optional<bool> DefaultPermissions { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| [JsonPropertyName("name_localizations")] | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("description_localizations")] | |||
| [JsonPropertyName("description_localizations")] | |||
| public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; } | |||
| [JsonProperty("name_localized")] | |||
| [JsonPropertyName("name_localized")] | |||
| public Optional<string> NameLocalized { get; set; } | |||
| [JsonProperty("description_localized")] | |||
| [JsonPropertyName("description_localized")] | |||
| public Optional<string> DescriptionLocalized { get; set; } | |||
| // V2 Permissions | |||
| [JsonProperty("dm_permission")] | |||
| [JsonPropertyName("dm_permission")] | |||
| public Optional<bool?> DmPermission { get; set; } | |||
| [JsonProperty("default_member_permissions")] | |||
| [JsonPropertyName("default_member_permissions")] | |||
| public Optional<GuildPermission?> DefaultMemberPermission { get; set; } | |||
| } | |||
| } | |||
| @@ -1,22 +1,22 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class ApplicationCommandInteractionData : IResolvable, IDiscordInteractionData | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public Optional<ApplicationCommandInteractionDataOption[]> Options { get; set; } | |||
| [JsonProperty("resolved")] | |||
| [JsonPropertyName("resolved")] | |||
| public Optional<ApplicationCommandInteractionDataResolved> Resolved { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ApplicationCommandType Type { get; set; } | |||
| } | |||
| } | |||
| @@ -1,19 +1,19 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class ApplicationCommandInteractionDataOption | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ApplicationCommandOptionType Type { get; set; } | |||
| [JsonProperty("value")] | |||
| [JsonPropertyName("value")] | |||
| public Optional<object> Value { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public Optional<ApplicationCommandInteractionDataOption[]> Options { get; set; } | |||
| } | |||
| } | |||
| @@ -1,24 +1,24 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Collections.Generic; | |||
| namespace Discord.API | |||
| { | |||
| internal class ApplicationCommandInteractionDataResolved | |||
| { | |||
| [JsonProperty("users")] | |||
| [JsonPropertyName("users")] | |||
| public Optional<Dictionary<string, User>> Users { get; set; } | |||
| [JsonProperty("members")] | |||
| [JsonPropertyName("members")] | |||
| public Optional<Dictionary<string, GuildMember>> Members { get; set; } | |||
| [JsonProperty("channels")] | |||
| [JsonPropertyName("channels")] | |||
| public Optional<Dictionary<string, Channel>> Channels { get; set; } | |||
| [JsonProperty("roles")] | |||
| [JsonPropertyName("roles")] | |||
| public Optional<Dictionary<string, Role>> Roles { get; set; } | |||
| [JsonProperty("messages")] | |||
| [JsonPropertyName("messages")] | |||
| public Optional<Dictionary<string, Message>> Messages { get; set; } | |||
| [JsonProperty("attachments")] | |||
| [JsonPropertyName("attachments")] | |||
| public Optional<Dictionary<string, Attachment>> Attachments { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -6,55 +6,55 @@ namespace Discord.API | |||
| { | |||
| internal class ApplicationCommandOption | |||
| { | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ApplicationCommandOptionType Type { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty("default")] | |||
| [JsonPropertyName("default")] | |||
| public Optional<bool> Default { get; set; } | |||
| [JsonProperty("required")] | |||
| [JsonPropertyName("required")] | |||
| public Optional<bool> Required { get; set; } | |||
| [JsonProperty("choices")] | |||
| [JsonPropertyName("choices")] | |||
| public Optional<ApplicationCommandOptionChoice[]> Choices { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public Optional<ApplicationCommandOption[]> Options { get; set; } | |||
| [JsonProperty("autocomplete")] | |||
| [JsonPropertyName("autocomplete")] | |||
| public Optional<bool> Autocomplete { get; set; } | |||
| [JsonProperty("min_value")] | |||
| [JsonPropertyName("min_value")] | |||
| public Optional<double> MinValue { get; set; } | |||
| [JsonProperty("max_value")] | |||
| [JsonPropertyName("max_value")] | |||
| public Optional<double> MaxValue { get; set; } | |||
| [JsonProperty("channel_types")] | |||
| [JsonPropertyName("channel_types")] | |||
| public Optional<ChannelType[]> ChannelTypes { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| [JsonPropertyName("name_localizations")] | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("description_localizations")] | |||
| [JsonPropertyName("description_localizations")] | |||
| public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; } | |||
| [JsonProperty("name_localized")] | |||
| [JsonPropertyName("name_localized")] | |||
| public Optional<string> NameLocalized { get; set; } | |||
| [JsonProperty("description_localized")] | |||
| [JsonPropertyName("description_localized")] | |||
| public Optional<string> DescriptionLocalized { get; set; } | |||
| [JsonProperty("min_length")] | |||
| [JsonPropertyName("min_length")] | |||
| public Optional<int> MinLength { get; set; } | |||
| [JsonProperty("max_length")] | |||
| [JsonPropertyName("max_length")] | |||
| public Optional<int> MaxLength { get; set; } | |||
| public ApplicationCommandOption() { } | |||
| @@ -1,20 +1,20 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Collections.Generic; | |||
| namespace Discord.API | |||
| { | |||
| internal class ApplicationCommandOptionChoice | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("value")] | |||
| [JsonPropertyName("value")] | |||
| public object Value { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| [JsonPropertyName("name_localizations")] | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("name_localized")] | |||
| [JsonPropertyName("name_localized")] | |||
| public Optional<string> NameLocalized { get; set; } | |||
| } | |||
| } | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class ApplicationCommandPermissions | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ApplicationCommandPermissionTarget Type { get; set; } | |||
| [JsonProperty("permission")] | |||
| [JsonPropertyName("permission")] | |||
| public bool Permission { get; set; } | |||
| } | |||
| } | |||
| @@ -1,28 +1,28 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Attachment | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("filename")] | |||
| [JsonPropertyName("filename")] | |||
| public string Filename { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public Optional<string> Description { get; set; } | |||
| [JsonProperty("content_type")] | |||
| [JsonPropertyName("content_type")] | |||
| public Optional<string> ContentType { get; set; } | |||
| [JsonProperty("size")] | |||
| [JsonPropertyName("size")] | |||
| public int Size { get; set; } | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public string Url { get; set; } | |||
| [JsonProperty("proxy_url")] | |||
| [JsonPropertyName("proxy_url")] | |||
| public string ProxyUrl { get; set; } | |||
| [JsonProperty("height")] | |||
| [JsonPropertyName("height")] | |||
| public Optional<int> Height { get; set; } | |||
| [JsonProperty("width")] | |||
| [JsonPropertyName("width")] | |||
| public Optional<int> Width { get; set; } | |||
| [JsonProperty("ephemeral")] | |||
| [JsonPropertyName("ephemeral")] | |||
| public Optional<bool> Ephemeral { get; set; } | |||
| } | |||
| } | |||
| @@ -1,22 +1,22 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class AuditLog | |||
| { | |||
| [JsonProperty("webhooks")] | |||
| [JsonPropertyName("webhooks")] | |||
| public Webhook[] Webhooks { get; set; } | |||
| [JsonProperty("threads")] | |||
| [JsonPropertyName("threads")] | |||
| public Channel[] Threads { get; set; } | |||
| [JsonProperty("integrations")] | |||
| [JsonPropertyName("integrations")] | |||
| public Integration[] Integrations { get; set; } | |||
| [JsonProperty("users")] | |||
| [JsonPropertyName("users")] | |||
| public User[] Users { get; set; } | |||
| [JsonProperty("audit_log_entries")] | |||
| [JsonPropertyName("audit_log_entries")] | |||
| public AuditLogEntry[] Entries { get; set; } | |||
| } | |||
| } | |||
| @@ -1,17 +1,17 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using Newtonsoft.Json.Linq; | |||
| namespace Discord.API | |||
| { | |||
| internal class AuditLogChange | |||
| { | |||
| [JsonProperty("key")] | |||
| [JsonPropertyName("key")] | |||
| public string ChangedProperty { get; set; } | |||
| [JsonProperty("new_value")] | |||
| [JsonPropertyName("new_value")] | |||
| public JToken NewValue { get; set; } | |||
| [JsonProperty("old_value")] | |||
| [JsonPropertyName("old_value")] | |||
| public JToken OldValue { get; set; } | |||
| } | |||
| } | |||
| @@ -1,26 +1,26 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class AuditLogEntry | |||
| { | |||
| [JsonProperty("target_id")] | |||
| [JsonPropertyName("target_id")] | |||
| public ulong? TargetId { get; set; } | |||
| [JsonProperty("user_id")] | |||
| [JsonPropertyName("user_id")] | |||
| public ulong? UserId { get; set; } | |||
| [JsonProperty("changes")] | |||
| [JsonPropertyName("changes")] | |||
| public AuditLogChange[] Changes { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public AuditLogOptions Options { get; set; } | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("action_type")] | |||
| [JsonPropertyName("action_type")] | |||
| public ActionType Action { get; set; } | |||
| [JsonProperty("reason")] | |||
| [JsonPropertyName("reason")] | |||
| public string Reason { get; set; } | |||
| } | |||
| } | |||
| @@ -1,28 +1,28 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class AuditLogOptions | |||
| { | |||
| [JsonProperty("count")] | |||
| [JsonPropertyName("count")] | |||
| public int? Count { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public ulong? ChannelId { get; set; } | |||
| [JsonProperty("message_id")] | |||
| [JsonPropertyName("message_id")] | |||
| public ulong? MessageId { get; set; } | |||
| //Prune | |||
| [JsonProperty("delete_member_days")] | |||
| [JsonPropertyName("delete_member_days")] | |||
| public int? PruneDeleteMemberDays { get; set; } | |||
| [JsonProperty("members_removed")] | |||
| [JsonPropertyName("members_removed")] | |||
| public int? PruneMembersRemoved { get; set; } | |||
| //Overwrite Update | |||
| [JsonProperty("role_name")] | |||
| [JsonPropertyName("role_name")] | |||
| public string OverwriteRoleName { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public PermissionTarget OverwriteType { get; set; } | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong? OverwriteTargetId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,22 +1,22 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class AutocompleteInteractionData : IDiscordInteractionData | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ApplicationCommandType Type { get; set; } | |||
| [JsonProperty("version")] | |||
| [JsonPropertyName("version")] | |||
| public ulong Version { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public AutocompleteInteractionDataOption[] Options { get; set; } | |||
| } | |||
| } | |||
| @@ -1,22 +1,22 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class AutocompleteInteractionDataOption | |||
| { | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ApplicationCommandOptionType Type { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public Optional<AutocompleteInteractionDataOption[]> Options { get; set; } | |||
| [JsonProperty("value")] | |||
| [JsonPropertyName("value")] | |||
| public Optional<object> Value { get; set; } | |||
| [JsonProperty("focused")] | |||
| [JsonPropertyName("focused")] | |||
| public Optional<bool> Focused { get; set; } | |||
| } | |||
| } | |||
| @@ -1,12 +1,12 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Ban | |||
| { | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public User User { get; set; } | |||
| [JsonProperty("reason")] | |||
| [JsonPropertyName("reason")] | |||
| public string Reason { get; set; } | |||
| } | |||
| } | |||
| @@ -1,28 +1,28 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class ButtonComponent : IMessageComponent | |||
| { | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ComponentType Type { get; set; } | |||
| [JsonProperty("style")] | |||
| [JsonPropertyName("style")] | |||
| public ButtonStyle Style { get; set; } | |||
| [JsonProperty("label")] | |||
| [JsonPropertyName("label")] | |||
| public Optional<string> Label { get; set; } | |||
| [JsonProperty("emoji")] | |||
| [JsonPropertyName("emoji")] | |||
| public Optional<Emoji> Emote { get; set; } | |||
| [JsonProperty("custom_id")] | |||
| [JsonPropertyName("custom_id")] | |||
| public Optional<string> CustomId { get; set; } | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public Optional<string> Url { get; set; } | |||
| [JsonProperty("disabled")] | |||
| [JsonPropertyName("disabled")] | |||
| public Optional<bool> Disabled { get; set; } | |||
| public ButtonComponent() { } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| namespace Discord.API | |||
| @@ -6,72 +6,72 @@ namespace Discord.API | |||
| internal class Channel | |||
| { | |||
| //Shared | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ChannelType Type { get; set; } | |||
| [JsonProperty("last_message_id")] | |||
| [JsonPropertyName("last_message_id")] | |||
| public ulong? LastMessageId { get; set; } | |||
| //GuildChannel | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public Optional<ulong> GuildId { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public Optional<string> Name { get; set; } | |||
| [JsonProperty("position")] | |||
| [JsonPropertyName("position")] | |||
| public Optional<int> Position { get; set; } | |||
| [JsonProperty("permission_overwrites")] | |||
| [JsonPropertyName("permission_overwrites")] | |||
| public Optional<Overwrite[]> PermissionOverwrites { get; set; } | |||
| [JsonProperty("parent_id")] | |||
| [JsonPropertyName("parent_id")] | |||
| public ulong? CategoryId { get; set; } | |||
| //TextChannel | |||
| [JsonProperty("topic")] | |||
| [JsonPropertyName("topic")] | |||
| public Optional<string> Topic { get; set; } | |||
| [JsonProperty("last_pin_timestamp")] | |||
| [JsonPropertyName("last_pin_timestamp")] | |||
| public Optional<DateTimeOffset?> LastPinTimestamp { get; set; } | |||
| [JsonProperty("nsfw")] | |||
| [JsonPropertyName("nsfw")] | |||
| public Optional<bool> Nsfw { get; set; } | |||
| [JsonProperty("rate_limit_per_user")] | |||
| [JsonPropertyName("rate_limit_per_user")] | |||
| public Optional<int> SlowMode { get; set; } | |||
| //VoiceChannel | |||
| [JsonProperty("bitrate")] | |||
| [JsonPropertyName("bitrate")] | |||
| public Optional<int> Bitrate { get; set; } | |||
| [JsonProperty("user_limit")] | |||
| [JsonPropertyName("user_limit")] | |||
| public Optional<int> UserLimit { get; set; } | |||
| [JsonProperty("rtc_region")] | |||
| [JsonPropertyName("rtc_region")] | |||
| public Optional<string> RTCRegion { get; set; } | |||
| //PrivateChannel | |||
| [JsonProperty("recipients")] | |||
| [JsonPropertyName("recipients")] | |||
| public Optional<User[]> Recipients { get; set; } | |||
| //GroupChannel | |||
| [JsonProperty("icon")] | |||
| [JsonPropertyName("icon")] | |||
| public Optional<string> Icon { get; set; } | |||
| //ThreadChannel | |||
| [JsonProperty("member")] | |||
| [JsonPropertyName("member")] | |||
| public Optional<ThreadMember> ThreadMember { get; set; } | |||
| [JsonProperty("thread_metadata")] | |||
| [JsonPropertyName("thread_metadata")] | |||
| public Optional<ThreadMetadata> ThreadMetadata { get; set; } | |||
| [JsonProperty("owner_id")] | |||
| [JsonPropertyName("owner_id")] | |||
| public Optional<ulong> OwnerId { get; set; } | |||
| [JsonProperty("message_count")] | |||
| [JsonPropertyName("message_count")] | |||
| public Optional<int> MessageCount { get; set; } | |||
| [JsonProperty("member_count")] | |||
| [JsonPropertyName("member_count")] | |||
| public Optional<int> MemberCount { get; set; } | |||
| //ForumChannel | |||
| [JsonProperty("available_tags")] | |||
| [JsonPropertyName("available_tags")] | |||
| public Optional<ForumTags[]> ForumTags { get; set; } | |||
| [JsonProperty("default_auto_archive_duration")] | |||
| [JsonPropertyName("default_auto_archive_duration")] | |||
| public Optional<ThreadArchiveDuration> AutoArchiveDuration { get; set; } | |||
| } | |||
| } | |||
| @@ -1,13 +1,13 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API.Rest | |||
| { | |||
| internal class ChannelThreads | |||
| { | |||
| [JsonProperty("threads")] | |||
| [JsonPropertyName("threads")] | |||
| public Channel[] Threads { get; set; } | |||
| [JsonProperty("members")] | |||
| [JsonPropertyName("members")] | |||
| public ThreadMember[] Members { get; set; } | |||
| } | |||
| } | |||
| @@ -1,27 +1,27 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Collections.Generic; | |||
| namespace Discord.API | |||
| { | |||
| internal class Connection | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public string Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public string Type { get; set; } | |||
| [JsonProperty("revoked")] | |||
| [JsonPropertyName("revoked")] | |||
| public Optional<bool> Revoked { get; set; } | |||
| [JsonProperty("integrations")] | |||
| [JsonPropertyName("integrations")] | |||
| public Optional<IReadOnlyCollection<Integration>> Integrations { get; set; } | |||
| [JsonProperty("verified")] | |||
| [JsonPropertyName("verified")] | |||
| public bool Verified { get; set; } | |||
| [JsonProperty("friend_sync")] | |||
| [JsonPropertyName("friend_sync")] | |||
| public bool FriendSync { get; set; } | |||
| [JsonProperty("show_activity")] | |||
| [JsonPropertyName("show_activity")] | |||
| public bool ShowActivity { get; set; } | |||
| [JsonProperty("visibility")] | |||
| [JsonPropertyName("visibility")] | |||
| public ConnectionVisibility Visibility { get; set; } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -10,11 +10,11 @@ namespace Discord.API | |||
| [JsonConverter(typeof(Discord.Net.Converters.DiscordErrorConverter))] | |||
| internal class DiscordError | |||
| { | |||
| [JsonProperty("message")] | |||
| [JsonPropertyName("message")] | |||
| public string Message { get; set; } | |||
| [JsonProperty("code")] | |||
| [JsonPropertyName("code")] | |||
| public DiscordErrorCode Code { get; set; } | |||
| [JsonProperty("errors")] | |||
| [JsonPropertyName("errors")] | |||
| public Optional<ErrorDetails[]> Errors { get; set; } | |||
| } | |||
| } | |||
| @@ -1,36 +1,36 @@ | |||
| using System; | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using Discord.Net.Converters; | |||
| namespace Discord.API | |||
| { | |||
| internal class Embed | |||
| { | |||
| [JsonProperty("title")] | |||
| [JsonPropertyName("title")] | |||
| public string Title { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public string Url { get; set; } | |||
| [JsonProperty("color")] | |||
| [JsonPropertyName("color")] | |||
| public uint? Color { get; set; } | |||
| [JsonProperty("type"), JsonConverter(typeof(EmbedTypeConverter))] | |||
| [JsonPropertyName("type"), JsonConverter(typeof(EmbedTypeConverter))] | |||
| public EmbedType Type { get; set; } | |||
| [JsonProperty("timestamp")] | |||
| [JsonPropertyName("timestamp")] | |||
| public DateTimeOffset? Timestamp { get; set; } | |||
| [JsonProperty("author")] | |||
| [JsonPropertyName("author")] | |||
| public Optional<EmbedAuthor> Author { get; set; } | |||
| [JsonProperty("footer")] | |||
| [JsonPropertyName("footer")] | |||
| public Optional<EmbedFooter> Footer { get; set; } | |||
| [JsonProperty("video")] | |||
| [JsonPropertyName("video")] | |||
| public Optional<EmbedVideo> Video { get; set; } | |||
| [JsonProperty("thumbnail")] | |||
| [JsonPropertyName("thumbnail")] | |||
| public Optional<EmbedThumbnail> Thumbnail { get; set; } | |||
| [JsonProperty("image")] | |||
| [JsonPropertyName("image")] | |||
| public Optional<EmbedImage> Image { get; set; } | |||
| [JsonProperty("provider")] | |||
| [JsonPropertyName("provider")] | |||
| public Optional<EmbedProvider> Provider { get; set; } | |||
| [JsonProperty("fields")] | |||
| [JsonPropertyName("fields")] | |||
| public Optional<EmbedField[]> Fields { get; set; } | |||
| } | |||
| } | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class EmbedAuthor | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public string Url { get; set; } | |||
| [JsonProperty("icon_url")] | |||
| [JsonPropertyName("icon_url")] | |||
| public string IconUrl { get; set; } | |||
| [JsonProperty("proxy_icon_url")] | |||
| [JsonPropertyName("proxy_icon_url")] | |||
| public string ProxyIconUrl { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class EmbedField | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("value")] | |||
| [JsonPropertyName("value")] | |||
| public string Value { get; set; } | |||
| [JsonProperty("inline")] | |||
| [JsonPropertyName("inline")] | |||
| public bool Inline { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class EmbedFooter | |||
| { | |||
| [JsonProperty("text")] | |||
| [JsonPropertyName("text")] | |||
| public string Text { get; set; } | |||
| [JsonProperty("icon_url")] | |||
| [JsonPropertyName("icon_url")] | |||
| public string IconUrl { get; set; } | |||
| [JsonProperty("proxy_icon_url")] | |||
| [JsonPropertyName("proxy_icon_url")] | |||
| public string ProxyIconUrl { get; set; } | |||
| } | |||
| } | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class EmbedImage | |||
| { | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public string Url { get; set; } | |||
| [JsonProperty("proxy_url")] | |||
| [JsonPropertyName("proxy_url")] | |||
| public string ProxyUrl { get; set; } | |||
| [JsonProperty("height")] | |||
| [JsonPropertyName("height")] | |||
| public Optional<int> Height { get; set; } | |||
| [JsonProperty("width")] | |||
| [JsonPropertyName("width")] | |||
| public Optional<int> Width { get; set; } | |||
| } | |||
| } | |||
| @@ -1,12 +1,12 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class EmbedProvider | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public string Url { get; set; } | |||
| } | |||
| } | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class EmbedThumbnail | |||
| { | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public string Url { get; set; } | |||
| [JsonProperty("proxy_url")] | |||
| [JsonPropertyName("proxy_url")] | |||
| public string ProxyUrl { get; set; } | |||
| [JsonProperty("height")] | |||
| [JsonPropertyName("height")] | |||
| public Optional<int> Height { get; set; } | |||
| [JsonProperty("width")] | |||
| [JsonPropertyName("width")] | |||
| public Optional<int> Width { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class EmbedVideo | |||
| { | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public string Url { get; set; } | |||
| [JsonProperty("height")] | |||
| [JsonPropertyName("height")] | |||
| public Optional<int> Height { get; set; } | |||
| [JsonProperty("width")] | |||
| [JsonPropertyName("width")] | |||
| public Optional<int> Width { get; set; } | |||
| } | |||
| } | |||
| @@ -1,22 +1,22 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Emoji | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong? Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("animated")] | |||
| [JsonPropertyName("animated")] | |||
| public bool? Animated { get; set; } | |||
| [JsonProperty("roles")] | |||
| [JsonPropertyName("roles")] | |||
| public ulong[] Roles { get; set; } | |||
| [JsonProperty("require_colons")] | |||
| [JsonPropertyName("require_colons")] | |||
| public bool RequireColons { get; set; } | |||
| [JsonProperty("managed")] | |||
| [JsonPropertyName("managed")] | |||
| public bool Managed { get; set; } | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public Optional<User> User { get; set; } | |||
| } | |||
| } | |||
| @@ -1,12 +1,12 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Error | |||
| { | |||
| [JsonProperty("code")] | |||
| [JsonPropertyName("code")] | |||
| public string Code { get; set; } | |||
| [JsonProperty("message")] | |||
| [JsonPropertyName("message")] | |||
| public string Message { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,13 +9,13 @@ namespace Discord.API | |||
| { | |||
| internal class ForumTags | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("emoji_id")] | |||
| [JsonPropertyName("emoji_id")] | |||
| public Optional<ulong?> EmojiId { get; set; } | |||
| [JsonProperty("emoji_name")] | |||
| [JsonPropertyName("emoji_name")] | |||
| public Optional<string> EmojiName { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,25 +9,25 @@ namespace Discord.API | |||
| { | |||
| internal class ForumThreadMessage | |||
| { | |||
| [JsonProperty("content")] | |||
| [JsonPropertyName("content")] | |||
| public Optional<string> Content { get; set; } | |||
| [JsonProperty("nonce")] | |||
| [JsonPropertyName("nonce")] | |||
| public Optional<string> Nonce { get; set; } | |||
| [JsonProperty("embeds")] | |||
| [JsonPropertyName("embeds")] | |||
| public Optional<Embed[]> Embeds { get; set; } | |||
| [JsonProperty("allowed_mentions")] | |||
| [JsonPropertyName("allowed_mentions")] | |||
| public Optional<AllowedMentions> AllowedMentions { get; set; } | |||
| [JsonProperty("components")] | |||
| [JsonPropertyName("components")] | |||
| public Optional<API.ActionRowComponent[]> Components { get; set; } | |||
| [JsonProperty("sticker_ids")] | |||
| [JsonPropertyName("sticker_ids")] | |||
| public Optional<ulong[]> Stickers { get; set; } | |||
| [JsonProperty("flags")] | |||
| [JsonPropertyName("flags")] | |||
| public Optional<MessageFlags> Flags { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using Newtonsoft.Json.Serialization; | |||
| using System.Runtime.Serialization; | |||
| @@ -6,41 +6,41 @@ namespace Discord.API | |||
| { | |||
| internal class Game | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("url")] | |||
| [JsonPropertyName("url")] | |||
| public Optional<string> StreamUrl { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public Optional<ActivityType?> Type { get; set; } | |||
| [JsonProperty("details")] | |||
| [JsonPropertyName("details")] | |||
| public Optional<string> Details { get; set; } | |||
| [JsonProperty("state")] | |||
| [JsonPropertyName("state")] | |||
| public Optional<string> State { get; set; } | |||
| [JsonProperty("application_id")] | |||
| [JsonPropertyName("application_id")] | |||
| public Optional<ulong> ApplicationId { get; set; } | |||
| [JsonProperty("assets")] | |||
| [JsonPropertyName("assets")] | |||
| public Optional<API.GameAssets> Assets { get; set; } | |||
| [JsonProperty("party")] | |||
| [JsonPropertyName("party")] | |||
| public Optional<API.GameParty> Party { get; set; } | |||
| [JsonProperty("secrets")] | |||
| [JsonPropertyName("secrets")] | |||
| public Optional<API.GameSecrets> Secrets { get; set; } | |||
| [JsonProperty("timestamps")] | |||
| [JsonPropertyName("timestamps")] | |||
| public Optional<API.GameTimestamps> Timestamps { get; set; } | |||
| [JsonProperty("instance")] | |||
| [JsonPropertyName("instance")] | |||
| public Optional<bool> Instance { get; set; } | |||
| [JsonProperty("sync_id")] | |||
| [JsonPropertyName("sync_id")] | |||
| public Optional<string> SyncId { get; set; } | |||
| [JsonProperty("session_id")] | |||
| [JsonPropertyName("session_id")] | |||
| public Optional<string> SessionId { get; set; } | |||
| [JsonProperty("Flags")] | |||
| [JsonPropertyName("Flags")] | |||
| public Optional<ActivityProperties> Flags { get; set; } | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public Optional<string> Id { get; set; } | |||
| [JsonProperty("emoji")] | |||
| [JsonPropertyName("emoji")] | |||
| public Optional<Emoji> Emoji { get; set; } | |||
| [JsonProperty("created_at")] | |||
| [JsonPropertyName("created_at")] | |||
| public Optional<long> CreatedAt { get; set; } | |||
| //[JsonProperty("buttons")] | |||
| //[JsonPropertyName("buttons")] | |||
| //public Optional<RichPresenceButton[]> Buttons { get; set; } | |||
| [OnError] | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class GameAssets | |||
| { | |||
| [JsonProperty("small_text")] | |||
| [JsonPropertyName("small_text")] | |||
| public Optional<string> SmallText { get; set; } | |||
| [JsonProperty("small_image")] | |||
| [JsonPropertyName("small_image")] | |||
| public Optional<string> SmallImage { get; set; } | |||
| [JsonProperty("large_text")] | |||
| [JsonPropertyName("large_text")] | |||
| public Optional<string> LargeText { get; set; } | |||
| [JsonProperty("large_image")] | |||
| [JsonPropertyName("large_image")] | |||
| public Optional<string> LargeImage { get; set; } | |||
| } | |||
| } | |||
| @@ -1,12 +1,12 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class GameParty | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public string Id { get; set; } | |||
| [JsonProperty("size")] | |||
| [JsonPropertyName("size")] | |||
| public long[] Size { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class GameSecrets | |||
| { | |||
| [JsonProperty("match")] | |||
| [JsonPropertyName("match")] | |||
| public string Match { get; set; } | |||
| [JsonProperty("join")] | |||
| [JsonPropertyName("join")] | |||
| public string Join { get; set; } | |||
| [JsonProperty("spectate")] | |||
| [JsonPropertyName("spectate")] | |||
| public string Spectate { get; set; } | |||
| } | |||
| } | |||
| } | |||
| @@ -1,15 +1,15 @@ | |||
| using System; | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class GameTimestamps | |||
| { | |||
| [JsonProperty("start")] | |||
| [JsonPropertyName("start")] | |||
| [UnixTimestamp] | |||
| public Optional<DateTimeOffset> Start { get; set; } | |||
| [JsonProperty("end")] | |||
| [JsonPropertyName("end")] | |||
| [UnixTimestamp] | |||
| public Optional<DateTimeOffset> End { get; set; } | |||
| } | |||
| } | |||
| } | |||
| @@ -1,87 +1,87 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Guild | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("icon")] | |||
| [JsonPropertyName("icon")] | |||
| public string Icon { get; set; } | |||
| [JsonProperty("splash")] | |||
| [JsonPropertyName("splash")] | |||
| public string Splash { get; set; } | |||
| [JsonProperty("discovery_splash")] | |||
| [JsonPropertyName("discovery_splash")] | |||
| public string DiscoverySplash { get; set; } | |||
| [JsonProperty("owner_id")] | |||
| [JsonPropertyName("owner_id")] | |||
| public ulong OwnerId { get; set; } | |||
| [JsonProperty("region")] | |||
| [JsonPropertyName("region")] | |||
| public string Region { get; set; } | |||
| [JsonProperty("afk_channel_id")] | |||
| [JsonPropertyName("afk_channel_id")] | |||
| public ulong? AFKChannelId { get; set; } | |||
| [JsonProperty("afk_timeout")] | |||
| [JsonPropertyName("afk_timeout")] | |||
| public int AFKTimeout { get; set; } | |||
| [JsonProperty("verification_level")] | |||
| [JsonPropertyName("verification_level")] | |||
| public VerificationLevel VerificationLevel { get; set; } | |||
| [JsonProperty("default_message_notifications")] | |||
| [JsonPropertyName("default_message_notifications")] | |||
| public DefaultMessageNotifications DefaultMessageNotifications { get; set; } | |||
| [JsonProperty("explicit_content_filter")] | |||
| [JsonPropertyName("explicit_content_filter")] | |||
| public ExplicitContentFilterLevel ExplicitContentFilter { get; set; } | |||
| [JsonProperty("voice_states")] | |||
| [JsonPropertyName("voice_states")] | |||
| public VoiceState[] VoiceStates { get; set; } | |||
| [JsonProperty("roles")] | |||
| [JsonPropertyName("roles")] | |||
| public Role[] Roles { get; set; } | |||
| [JsonProperty("emojis")] | |||
| [JsonPropertyName("emojis")] | |||
| public Emoji[] Emojis { get; set; } | |||
| [JsonProperty("features")] | |||
| [JsonPropertyName("features")] | |||
| public GuildFeatures Features { get; set; } | |||
| [JsonProperty("mfa_level")] | |||
| [JsonPropertyName("mfa_level")] | |||
| public MfaLevel MfaLevel { get; set; } | |||
| [JsonProperty("application_id")] | |||
| [JsonPropertyName("application_id")] | |||
| public ulong? ApplicationId { get; set; } | |||
| [JsonProperty("widget_enabled")] | |||
| [JsonPropertyName("widget_enabled")] | |||
| public Optional<bool> WidgetEnabled { get; set; } | |||
| [JsonProperty("widget_channel_id")] | |||
| [JsonPropertyName("widget_channel_id")] | |||
| public Optional<ulong?> WidgetChannelId { get; set; } | |||
| [JsonProperty("system_channel_id")] | |||
| [JsonPropertyName("system_channel_id")] | |||
| public ulong? SystemChannelId { get; set; } | |||
| [JsonProperty("premium_tier")] | |||
| [JsonPropertyName("premium_tier")] | |||
| public PremiumTier PremiumTier { get; set; } | |||
| [JsonProperty("vanity_url_code")] | |||
| [JsonPropertyName("vanity_url_code")] | |||
| public string VanityURLCode { get; set; } | |||
| [JsonProperty("banner")] | |||
| [JsonPropertyName("banner")] | |||
| public string Banner { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| // this value is inverted, flags set will turn OFF features | |||
| [JsonProperty("system_channel_flags")] | |||
| [JsonPropertyName("system_channel_flags")] | |||
| public SystemChannelMessageDeny SystemChannelFlags { get; set; } | |||
| [JsonProperty("rules_channel_id")] | |||
| [JsonPropertyName("rules_channel_id")] | |||
| public ulong? RulesChannelId { get; set; } | |||
| [JsonProperty("max_presences")] | |||
| [JsonPropertyName("max_presences")] | |||
| public Optional<int?> MaxPresences { get; set; } | |||
| [JsonProperty("max_members")] | |||
| [JsonPropertyName("max_members")] | |||
| public Optional<int> MaxMembers { get; set; } | |||
| [JsonProperty("premium_subscription_count")] | |||
| [JsonPropertyName("premium_subscription_count")] | |||
| public int? PremiumSubscriptionCount { get; set; } | |||
| [JsonProperty("preferred_locale")] | |||
| [JsonPropertyName("preferred_locale")] | |||
| public string PreferredLocale { get; set; } | |||
| [JsonProperty("public_updates_channel_id")] | |||
| [JsonPropertyName("public_updates_channel_id")] | |||
| public ulong? PublicUpdatesChannelId { get; set; } | |||
| [JsonProperty("max_video_channel_users")] | |||
| [JsonPropertyName("max_video_channel_users")] | |||
| public Optional<int> MaxVideoChannelUsers { get; set; } | |||
| [JsonProperty("approximate_member_count")] | |||
| [JsonPropertyName("approximate_member_count")] | |||
| public Optional<int> ApproximateMemberCount { get; set; } | |||
| [JsonProperty("approximate_presence_count")] | |||
| [JsonPropertyName("approximate_presence_count")] | |||
| public Optional<int> ApproximatePresenceCount { get; set; } | |||
| [JsonProperty("threads")] | |||
| [JsonPropertyName("threads")] | |||
| public Optional<Channel[]> Threads { get; set; } | |||
| [JsonProperty("nsfw_level")] | |||
| [JsonPropertyName("nsfw_level")] | |||
| public NsfwLevel NsfwLevel { get; set; } | |||
| [JsonProperty("stickers")] | |||
| [JsonPropertyName("stickers")] | |||
| public Sticker[] Stickers { get; set; } | |||
| [JsonProperty("premium_progress_bar_enabled")] | |||
| [JsonPropertyName("premium_progress_bar_enabled")] | |||
| public Optional<bool> IsBoostProgressBarEnabled { get; set; } | |||
| } | |||
| } | |||
| @@ -1,19 +1,19 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class GuildApplicationCommandPermission | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("application_id")] | |||
| [JsonPropertyName("application_id")] | |||
| public ulong ApplicationId { get; set; } | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public ulong GuildId { get; set; } | |||
| [JsonProperty("permissions")] | |||
| [JsonPropertyName("permissions")] | |||
| public ApplicationCommandPermissions[] Permissions { get; set; } | |||
| } | |||
| } | |||
| @@ -1,29 +1,29 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| namespace Discord.API | |||
| { | |||
| internal class GuildMember | |||
| { | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public User User { get; set; } | |||
| [JsonProperty("nick")] | |||
| [JsonPropertyName("nick")] | |||
| public Optional<string> Nick { get; set; } | |||
| [JsonProperty("avatar")] | |||
| [JsonPropertyName("avatar")] | |||
| public Optional<string> Avatar { get; set; } | |||
| [JsonProperty("roles")] | |||
| [JsonPropertyName("roles")] | |||
| public Optional<ulong[]> Roles { get; set; } | |||
| [JsonProperty("joined_at")] | |||
| [JsonPropertyName("joined_at")] | |||
| public Optional<DateTimeOffset> JoinedAt { get; set; } | |||
| [JsonProperty("deaf")] | |||
| [JsonPropertyName("deaf")] | |||
| public Optional<bool> Deaf { get; set; } | |||
| [JsonProperty("mute")] | |||
| [JsonPropertyName("mute")] | |||
| public Optional<bool> Mute { get; set; } | |||
| [JsonProperty("pending")] | |||
| [JsonPropertyName("pending")] | |||
| public Optional<bool> Pending { get; set; } | |||
| [JsonProperty("premium_since")] | |||
| [JsonPropertyName("premium_since")] | |||
| public Optional<DateTimeOffset?> PremiumSince { get; set; } | |||
| [JsonProperty("communication_disabled_until")] | |||
| [JsonPropertyName("communication_disabled_until")] | |||
| public Optional<DateTimeOffset?> TimedOutUntil { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,37 +9,37 @@ namespace Discord.API | |||
| { | |||
| internal class GuildScheduledEvent | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public ulong GuildId { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public Optional<ulong?> ChannelId { get; set; } | |||
| [JsonProperty("creator_id")] | |||
| [JsonPropertyName("creator_id")] | |||
| public Optional<ulong> CreatorId { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public Optional<string> Description { get; set; } | |||
| [JsonProperty("scheduled_start_time")] | |||
| [JsonPropertyName("scheduled_start_time")] | |||
| public DateTimeOffset ScheduledStartTime { get; set; } | |||
| [JsonProperty("scheduled_end_time")] | |||
| [JsonPropertyName("scheduled_end_time")] | |||
| public DateTimeOffset? ScheduledEndTime { get; set; } | |||
| [JsonProperty("privacy_level")] | |||
| [JsonPropertyName("privacy_level")] | |||
| public GuildScheduledEventPrivacyLevel PrivacyLevel { get; set; } | |||
| [JsonProperty("status")] | |||
| [JsonPropertyName("status")] | |||
| public GuildScheduledEventStatus Status { get; set; } | |||
| [JsonProperty("entity_type")] | |||
| [JsonPropertyName("entity_type")] | |||
| public GuildScheduledEventType EntityType { get; set; } | |||
| [JsonProperty("entity_id")] | |||
| [JsonPropertyName("entity_id")] | |||
| public ulong? EntityId { get; set; } | |||
| [JsonProperty("entity_metadata")] | |||
| [JsonPropertyName("entity_metadata")] | |||
| public GuildScheduledEventEntityMetadata EntityMetadata { get; set; } | |||
| [JsonProperty("creator")] | |||
| [JsonPropertyName("creator")] | |||
| public Optional<User> Creator { get; set; } | |||
| [JsonProperty("user_count")] | |||
| [JsonPropertyName("user_count")] | |||
| public Optional<int> UserCount { get; set; } | |||
| [JsonProperty("image")] | |||
| [JsonPropertyName("image")] | |||
| public string Image { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,7 +9,7 @@ namespace Discord.API | |||
| { | |||
| internal class GuildScheduledEventEntityMetadata | |||
| { | |||
| [JsonProperty("location")] | |||
| [JsonPropertyName("location")] | |||
| public Optional<string> Location { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,11 +9,11 @@ namespace Discord.API | |||
| { | |||
| internal class GuildScheduledEventUser | |||
| { | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public User User { get; set; } | |||
| [JsonProperty("member")] | |||
| [JsonPropertyName("member")] | |||
| public Optional<GuildMember> Member { get; set; } | |||
| [JsonProperty("guild_scheduled_event_id")] | |||
| [JsonPropertyName("guild_scheduled_event_id")] | |||
| public ulong GuildScheduledEventId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,12 +1,12 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class GuildWidget | |||
| { | |||
| [JsonProperty("enabled")] | |||
| [JsonPropertyName("enabled")] | |||
| public bool Enabled { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public ulong? ChannelId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,9 +9,9 @@ namespace Discord.API | |||
| { | |||
| internal class InstallParams | |||
| { | |||
| [JsonProperty("scopes")] | |||
| [JsonPropertyName("scopes")] | |||
| public string[] Scopes { get; set; } | |||
| [JsonProperty("permissions")] | |||
| [JsonPropertyName("permissions")] | |||
| public ulong Permission { get; set; } | |||
| } | |||
| } | |||
| @@ -1,42 +1,42 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| namespace Discord.API | |||
| { | |||
| internal class Integration | |||
| { | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public Optional<ulong> GuildId { get; set; } | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public string Type { get; set; } | |||
| [JsonProperty("enabled")] | |||
| [JsonPropertyName("enabled")] | |||
| public bool Enabled { get; set; } | |||
| [JsonProperty("syncing")] | |||
| [JsonPropertyName("syncing")] | |||
| public Optional<bool?> Syncing { get; set; } | |||
| [JsonProperty("role_id")] | |||
| [JsonPropertyName("role_id")] | |||
| public Optional<ulong?> RoleId { get; set; } | |||
| [JsonProperty("enable_emoticons")] | |||
| [JsonPropertyName("enable_emoticons")] | |||
| public Optional<bool?> EnableEmoticons { get; set; } | |||
| [JsonProperty("expire_behavior")] | |||
| [JsonPropertyName("expire_behavior")] | |||
| public Optional<IntegrationExpireBehavior> ExpireBehavior { get; set; } | |||
| [JsonProperty("expire_grace_period")] | |||
| [JsonPropertyName("expire_grace_period")] | |||
| public Optional<int?> ExpireGracePeriod { get; set; } | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public Optional<User> User { get; set; } | |||
| [JsonProperty("account")] | |||
| [JsonPropertyName("account")] | |||
| public Optional<IntegrationAccount> Account { get; set; } | |||
| [JsonProperty("synced_at")] | |||
| [JsonPropertyName("synced_at")] | |||
| public Optional<DateTimeOffset> SyncedAt { get; set; } | |||
| [JsonProperty("subscriber_count")] | |||
| [JsonPropertyName("subscriber_count")] | |||
| public Optional<int?> SubscriberAccount { get; set; } | |||
| [JsonProperty("revoked")] | |||
| [JsonPropertyName("revoked")] | |||
| public Optional<bool?> Revoked { get; set; } | |||
| [JsonProperty("application")] | |||
| [JsonPropertyName("application")] | |||
| public Optional<IntegrationApplication> Application { get; set; } | |||
| } | |||
| } | |||
| @@ -1,12 +1,12 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class IntegrationAccount | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public string Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| } | |||
| } | |||
| @@ -1,20 +1,20 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class IntegrationApplication | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("icon")] | |||
| [JsonPropertyName("icon")] | |||
| public Optional<string> Icon { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty("summary")] | |||
| [JsonPropertyName("summary")] | |||
| public string Summary { get; set; } | |||
| [JsonProperty("bot")] | |||
| [JsonPropertyName("bot")] | |||
| public Optional<User> Bot { get; set; } | |||
| } | |||
| } | |||
| @@ -1,47 +1,47 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| [JsonConverter(typeof(Net.Converters.InteractionConverter))] | |||
| internal class Interaction | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("application_id")] | |||
| [JsonPropertyName("application_id")] | |||
| public ulong ApplicationId { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public InteractionType Type { get; set; } | |||
| [JsonProperty("data")] | |||
| [JsonPropertyName("data")] | |||
| public Optional<IDiscordInteractionData> Data { get; set; } | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public Optional<ulong> GuildId { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public Optional<ulong> ChannelId { get; set; } | |||
| [JsonProperty("member")] | |||
| [JsonPropertyName("member")] | |||
| public Optional<GuildMember> Member { get; set; } | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public Optional<User> User { get; set; } | |||
| [JsonProperty("token")] | |||
| [JsonPropertyName("token")] | |||
| public string Token { get; set; } | |||
| [JsonProperty("version")] | |||
| [JsonPropertyName("version")] | |||
| public int Version { get; set; } | |||
| [JsonProperty("message")] | |||
| [JsonPropertyName("message")] | |||
| public Optional<Message> Message { get; set; } | |||
| [JsonProperty("locale")] | |||
| [JsonPropertyName("locale")] | |||
| public Optional<string> UserLocale { get; set; } | |||
| [JsonProperty("guild_locale")] | |||
| [JsonPropertyName("guild_locale")] | |||
| public Optional<string> GuildLocale { get; set; } | |||
| } | |||
| } | |||
| @@ -1,34 +1,34 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class InteractionCallbackData | |||
| { | |||
| [JsonProperty("tts")] | |||
| [JsonPropertyName("tts")] | |||
| public Optional<bool> TTS { get; set; } | |||
| [JsonProperty("content")] | |||
| [JsonPropertyName("content")] | |||
| public Optional<string> Content { get; set; } | |||
| [JsonProperty("embeds")] | |||
| [JsonPropertyName("embeds")] | |||
| public Optional<Embed[]> Embeds { get; set; } | |||
| [JsonProperty("allowed_mentions")] | |||
| [JsonPropertyName("allowed_mentions")] | |||
| public Optional<AllowedMentions> AllowedMentions { get; set; } | |||
| [JsonProperty("flags")] | |||
| [JsonPropertyName("flags")] | |||
| public Optional<MessageFlags> Flags { get; set; } | |||
| [JsonProperty("components")] | |||
| [JsonPropertyName("components")] | |||
| public Optional<ActionRowComponent[]> Components { get; set; } | |||
| [JsonProperty("choices")] | |||
| [JsonPropertyName("choices")] | |||
| public Optional<ApplicationCommandOptionChoice[]> Choices { get; set; } | |||
| [JsonProperty("title")] | |||
| [JsonPropertyName("title")] | |||
| public Optional<string> Title { get; set; } | |||
| [JsonProperty("custom_id")] | |||
| [JsonPropertyName("custom_id")] | |||
| public Optional<string> CustomId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,13 +1,13 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class InteractionResponse | |||
| { | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public InteractionResponseType Type { get; set; } | |||
| [JsonProperty("data")] | |||
| [JsonPropertyName("data")] | |||
| public Optional<InteractionCallbackData> Data { get; set; } | |||
| } | |||
| } | |||
| @@ -1,24 +1,24 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Invite | |||
| { | |||
| [JsonProperty("code")] | |||
| [JsonPropertyName("code")] | |||
| public string Code { get; set; } | |||
| [JsonProperty("guild")] | |||
| [JsonPropertyName("guild")] | |||
| public Optional<InviteGuild> Guild { get; set; } | |||
| [JsonProperty("channel")] | |||
| [JsonPropertyName("channel")] | |||
| public InviteChannel Channel { get; set; } | |||
| [JsonProperty("inviter")] | |||
| [JsonPropertyName("inviter")] | |||
| public Optional<User> Inviter { get; set; } | |||
| [JsonProperty("approximate_presence_count")] | |||
| [JsonPropertyName("approximate_presence_count")] | |||
| public Optional<int?> PresenceCount { get; set; } | |||
| [JsonProperty("approximate_member_count")] | |||
| [JsonPropertyName("approximate_member_count")] | |||
| public Optional<int?> MemberCount { get; set; } | |||
| [JsonProperty("target_user")] | |||
| [JsonPropertyName("target_user")] | |||
| public Optional<User> TargetUser { get; set; } | |||
| [JsonProperty("target_user_type")] | |||
| [JsonPropertyName("target_user_type")] | |||
| public Optional<TargetUserType> TargetUserType { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class InviteChannel | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public int Type { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class InviteGuild | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("splash_hash")] | |||
| [JsonPropertyName("splash_hash")] | |||
| public string SplashHash { get; set; } | |||
| } | |||
| } | |||
| @@ -1,19 +1,19 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| namespace Discord.API | |||
| { | |||
| internal class InviteMetadata : Invite | |||
| { | |||
| [JsonProperty("uses")] | |||
| [JsonPropertyName("uses")] | |||
| public int Uses { get; set; } | |||
| [JsonProperty("max_uses")] | |||
| [JsonPropertyName("max_uses")] | |||
| public int MaxUses { get; set; } | |||
| [JsonProperty("max_age")] | |||
| [JsonPropertyName("max_age")] | |||
| public int MaxAge { get; set; } | |||
| [JsonProperty("temporary")] | |||
| [JsonPropertyName("temporary")] | |||
| public bool Temporary { get; set; } | |||
| [JsonProperty("created_at")] | |||
| [JsonPropertyName("created_at")] | |||
| public DateTimeOffset CreatedAt { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| @@ -10,13 +10,13 @@ namespace Discord.API | |||
| /// <summary> | |||
| /// The unique code for the invite link. | |||
| /// </summary> | |||
| [JsonProperty("code")] | |||
| [JsonPropertyName("code")] | |||
| public string Code { get; set; } | |||
| /// <summary> | |||
| /// The total amount of vanity invite uses. | |||
| /// </summary> | |||
| [JsonProperty("uses")] | |||
| [JsonPropertyName("uses")] | |||
| public int Uses { get; set; } | |||
| } | |||
| } | |||
| @@ -1,66 +1,66 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| namespace Discord.API | |||
| { | |||
| internal class Message | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public MessageType Type { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public ulong ChannelId { get; set; } | |||
| // ALWAYS sent on WebSocket messages | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public Optional<ulong> GuildId { get; set; } | |||
| [JsonProperty("webhook_id")] | |||
| [JsonPropertyName("webhook_id")] | |||
| public Optional<ulong> WebhookId { get; set; } | |||
| [JsonProperty("author")] | |||
| [JsonPropertyName("author")] | |||
| public Optional<User> Author { get; set; } | |||
| // ALWAYS sent on WebSocket messages | |||
| [JsonProperty("member")] | |||
| [JsonPropertyName("member")] | |||
| public Optional<GuildMember> Member { get; set; } | |||
| [JsonProperty("content")] | |||
| [JsonPropertyName("content")] | |||
| public Optional<string> Content { get; set; } | |||
| [JsonProperty("timestamp")] | |||
| [JsonPropertyName("timestamp")] | |||
| public Optional<DateTimeOffset> Timestamp { get; set; } | |||
| [JsonProperty("edited_timestamp")] | |||
| [JsonPropertyName("edited_timestamp")] | |||
| public Optional<DateTimeOffset?> EditedTimestamp { get; set; } | |||
| [JsonProperty("tts")] | |||
| [JsonPropertyName("tts")] | |||
| public Optional<bool> IsTextToSpeech { get; set; } | |||
| [JsonProperty("mention_everyone")] | |||
| [JsonPropertyName("mention_everyone")] | |||
| public Optional<bool> MentionEveryone { get; set; } | |||
| [JsonProperty("mentions")] | |||
| [JsonPropertyName("mentions")] | |||
| public Optional<User[]> UserMentions { get; set; } | |||
| [JsonProperty("mention_roles")] | |||
| [JsonPropertyName("mention_roles")] | |||
| public Optional<ulong[]> RoleMentions { get; set; } | |||
| [JsonProperty("attachments")] | |||
| [JsonPropertyName("attachments")] | |||
| public Optional<Attachment[]> Attachments { get; set; } | |||
| [JsonProperty("embeds")] | |||
| [JsonPropertyName("embeds")] | |||
| public Optional<Embed[]> Embeds { get; set; } | |||
| [JsonProperty("pinned")] | |||
| [JsonPropertyName("pinned")] | |||
| public Optional<bool> Pinned { get; set; } | |||
| [JsonProperty("reactions")] | |||
| [JsonPropertyName("reactions")] | |||
| public Optional<Reaction[]> Reactions { get; set; } | |||
| // sent with Rich Presence-related chat embeds | |||
| [JsonProperty("activity")] | |||
| [JsonPropertyName("activity")] | |||
| public Optional<MessageActivity> Activity { get; set; } | |||
| // sent with Rich Presence-related chat embeds | |||
| [JsonProperty("application")] | |||
| [JsonPropertyName("application")] | |||
| public Optional<MessageApplication> Application { get; set; } | |||
| [JsonProperty("message_reference")] | |||
| [JsonPropertyName("message_reference")] | |||
| public Optional<MessageReference> Reference { get; set; } | |||
| [JsonProperty("flags")] | |||
| [JsonPropertyName("flags")] | |||
| public Optional<MessageFlags> Flags { get; set; } | |||
| [JsonProperty("allowed_mentions")] | |||
| [JsonPropertyName("allowed_mentions")] | |||
| public Optional<AllowedMentions> AllowedMentions { get; set; } | |||
| [JsonProperty("referenced_message")] | |||
| [JsonPropertyName("referenced_message")] | |||
| public Optional<Message> ReferencedMessage { get; set; } | |||
| [JsonProperty("components")] | |||
| [JsonPropertyName("components")] | |||
| public Optional<API.ActionRowComponent[]> Components { get; set; } | |||
| public Optional<MessageInteraction> Interaction { get; set; } | |||
| [JsonProperty("sticker_items")] | |||
| [JsonPropertyName("sticker_items")] | |||
| public Optional<StickerItem[]> StickerItems { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,9 +9,9 @@ namespace Discord.API | |||
| { | |||
| public class MessageActivity | |||
| { | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public Optional<MessageActivityType> Type { get; set; } | |||
| [JsonProperty("party_id")] | |||
| [JsonPropertyName("party_id")] | |||
| public Optional<string> PartyId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -12,27 +12,27 @@ namespace Discord.API | |||
| /// <summary> | |||
| /// Gets the snowflake ID of the application. | |||
| /// </summary> | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| /// <summary> | |||
| /// Gets the ID of the embed's image asset. | |||
| /// </summary> | |||
| [JsonProperty("cover_image")] | |||
| [JsonPropertyName("cover_image")] | |||
| public string CoverImage { get; set; } | |||
| /// <summary> | |||
| /// Gets the application's description. | |||
| /// </summary> | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| /// <summary> | |||
| /// Gets the ID of the application's icon. | |||
| /// </summary> | |||
| [JsonProperty("icon")] | |||
| [JsonPropertyName("icon")] | |||
| public string Icon { get; set; } | |||
| /// <summary> | |||
| /// Gets the name of the application. | |||
| /// </summary> | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| } | |||
| } | |||
| @@ -1,19 +1,19 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class MessageComponentInteractionData : IDiscordInteractionData | |||
| { | |||
| [JsonProperty("custom_id")] | |||
| [JsonPropertyName("custom_id")] | |||
| public string CustomId { get; set; } | |||
| [JsonProperty("component_type")] | |||
| [JsonPropertyName("component_type")] | |||
| public ComponentType ComponentType { get; set; } | |||
| [JsonProperty("values")] | |||
| [JsonPropertyName("values")] | |||
| public Optional<string[]> Values { get; set; } | |||
| [JsonProperty("value")] | |||
| [JsonPropertyName("value")] | |||
| public Optional<string> Value { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,13 +9,13 @@ namespace Discord.API | |||
| { | |||
| internal class MessageInteraction | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public InteractionType Type { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public User User { get; set; } | |||
| } | |||
| } | |||
| @@ -1,19 +1,19 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class MessageReference | |||
| { | |||
| [JsonProperty("message_id")] | |||
| [JsonPropertyName("message_id")] | |||
| public Optional<ulong> MessageId { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public Optional<ulong> ChannelId { get; set; } // Optional when sending, always present when receiving | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public Optional<ulong> GuildId { get; set; } | |||
| [JsonProperty("fail_if_not_exists")] | |||
| [JsonPropertyName("fail_if_not_exists")] | |||
| public Optional<bool> FailIfNotExists { get; set; } | |||
| } | |||
| } | |||
| @@ -1,13 +1,13 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class ModalInteractionData : IDiscordInteractionData | |||
| { | |||
| [JsonProperty("custom_id")] | |||
| [JsonPropertyName("custom_id")] | |||
| public string CustomId { get; set; } | |||
| [JsonProperty("components")] | |||
| [JsonPropertyName("components")] | |||
| public API.ActionRowComponent[] Components { get; set; } | |||
| } | |||
| } | |||
| @@ -1,11 +1,11 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Collections.Generic; | |||
| namespace Discord.API | |||
| { | |||
| internal class NitroStickerPacks | |||
| { | |||
| [JsonProperty("sticker_packs")] | |||
| [JsonPropertyName("sticker_packs")] | |||
| public List<StickerPack> StickerPacks { get; set; } | |||
| } | |||
| } | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Overwrite | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong TargetId { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public PermissionTarget TargetType { get; set; } | |||
| [JsonProperty("deny"), Int53] | |||
| [JsonPropertyName("deny"), Int53] | |||
| public string Deny { get; set; } | |||
| [JsonProperty("allow"), Int53] | |||
| [JsonPropertyName("allow"), Int53] | |||
| public string Allow { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| @@ -6,27 +6,27 @@ namespace Discord.API | |||
| { | |||
| internal class Presence | |||
| { | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public User User { get; set; } | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public Optional<ulong> GuildId { get; set; } | |||
| [JsonProperty("status")] | |||
| [JsonPropertyName("status")] | |||
| public UserStatus Status { get; set; } | |||
| [JsonProperty("roles")] | |||
| [JsonPropertyName("roles")] | |||
| public Optional<ulong[]> Roles { get; set; } | |||
| [JsonProperty("nick")] | |||
| [JsonPropertyName("nick")] | |||
| public Optional<string> Nick { get; set; } | |||
| // This property is a Dictionary where each key is the ClientType | |||
| // and the values are the current client status. | |||
| // The client status values are all the same. | |||
| // Example: | |||
| // "client_status": { "desktop": "dnd", "mobile": "dnd" } | |||
| [JsonProperty("client_status")] | |||
| [JsonPropertyName("client_status")] | |||
| public Optional<Dictionary<string, string>> ClientStatus { get; set; } | |||
| [JsonProperty("activities")] | |||
| [JsonPropertyName("activities")] | |||
| public List<Game> Activities { get; set; } | |||
| [JsonProperty("premium_since")] | |||
| [JsonPropertyName("premium_since")] | |||
| public Optional<DateTimeOffset?> PremiumSince { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,9 +9,9 @@ namespace Discord.API | |||
| { | |||
| internal class ErrorDetails | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public Optional<string> Name { get; set; } | |||
| [JsonProperty("errors")] | |||
| [JsonPropertyName("errors")] | |||
| public Error[] Errors { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| using System.Collections.Generic; | |||
| using System.Linq; | |||
| @@ -9,13 +9,13 @@ namespace Discord.API | |||
| { | |||
| internal class Ratelimit | |||
| { | |||
| [JsonProperty("global")] | |||
| [JsonPropertyName("global")] | |||
| public bool Global { get; set; } | |||
| [JsonProperty("message")] | |||
| [JsonPropertyName("message")] | |||
| public string Message { get; set; } | |||
| [JsonProperty("retry_after")] | |||
| [JsonPropertyName("retry_after")] | |||
| public double RetryAfter { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Reaction | |||
| { | |||
| [JsonProperty("count")] | |||
| [JsonPropertyName("count")] | |||
| public int Count { get; set; } | |||
| [JsonProperty("me")] | |||
| [JsonPropertyName("me")] | |||
| public bool Me { get; set; } | |||
| [JsonProperty("emoji")] | |||
| [JsonPropertyName("emoji")] | |||
| public Emoji Emoji { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class ReadState | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("mention_count")] | |||
| [JsonPropertyName("mention_count")] | |||
| public int MentionCount { get; set; } | |||
| [JsonProperty("last_message_id")] | |||
| [JsonPropertyName("last_message_id")] | |||
| public Optional<ulong> LastMessageId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Relationship | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public User User { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public RelationshipType Type { get; set; } | |||
| } | |||
| } | |||
| @@ -1,30 +1,30 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Role | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("icon")] | |||
| [JsonPropertyName("icon")] | |||
| public Optional<string> Icon { get; set; } | |||
| [JsonProperty("unicode_emoji")] | |||
| [JsonPropertyName("unicode_emoji")] | |||
| public Optional<string> Emoji { get; set; } | |||
| [JsonProperty("color")] | |||
| [JsonPropertyName("color")] | |||
| public uint Color { get; set; } | |||
| [JsonProperty("hoist")] | |||
| [JsonPropertyName("hoist")] | |||
| public bool Hoist { get; set; } | |||
| [JsonProperty("mentionable")] | |||
| [JsonPropertyName("mentionable")] | |||
| public bool Mentionable { get; set; } | |||
| [JsonProperty("position")] | |||
| [JsonPropertyName("position")] | |||
| public int Position { get; set; } | |||
| [JsonProperty("permissions"), Int53] | |||
| [JsonPropertyName("permissions"), Int53] | |||
| public string Permissions { get; set; } | |||
| [JsonProperty("managed")] | |||
| [JsonPropertyName("managed")] | |||
| public bool Managed { get; set; } | |||
| [JsonProperty("tags")] | |||
| [JsonPropertyName("tags")] | |||
| public Optional<RoleTags> Tags { get; set; } | |||
| } | |||
| } | |||
| @@ -1,14 +1,14 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class RoleTags | |||
| { | |||
| [JsonProperty("bot_id")] | |||
| [JsonPropertyName("bot_id")] | |||
| public Optional<ulong> BotId { get; set; } | |||
| [JsonProperty("integration_id")] | |||
| [JsonPropertyName("integration_id")] | |||
| public Optional<ulong> IntegrationId { get; set; } | |||
| [JsonProperty("premium_subscriber")] | |||
| [JsonPropertyName("premium_subscriber")] | |||
| public Optional<bool?> IsPremiumSubscriber { get; set; } | |||
| } | |||
| } | |||
| @@ -1,32 +1,32 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Linq; | |||
| namespace Discord.API | |||
| { | |||
| internal class SelectMenuComponent : IMessageComponent | |||
| { | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ComponentType Type { get; set; } | |||
| [JsonProperty("custom_id")] | |||
| [JsonPropertyName("custom_id")] | |||
| public string CustomId { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public SelectMenuOption[] Options { get; set; } | |||
| [JsonProperty("placeholder")] | |||
| [JsonPropertyName("placeholder")] | |||
| public Optional<string> Placeholder { get; set; } | |||
| [JsonProperty("min_values")] | |||
| [JsonPropertyName("min_values")] | |||
| public int MinValues { get; set; } | |||
| [JsonProperty("max_values")] | |||
| [JsonPropertyName("max_values")] | |||
| public int MaxValues { get; set; } | |||
| [JsonProperty("disabled")] | |||
| [JsonPropertyName("disabled")] | |||
| public bool Disabled { get; set; } | |||
| [JsonProperty("values")] | |||
| [JsonPropertyName("values")] | |||
| public Optional<string[]> Values { get; set; } | |||
| public SelectMenuComponent() { } | |||
| @@ -1,22 +1,22 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class SelectMenuOption | |||
| { | |||
| [JsonProperty("label")] | |||
| [JsonPropertyName("label")] | |||
| public string Label { get; set; } | |||
| [JsonProperty("value")] | |||
| [JsonPropertyName("value")] | |||
| public string Value { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public Optional<string> Description { get; set; } | |||
| [JsonProperty("emoji")] | |||
| [JsonPropertyName("emoji")] | |||
| public Optional<Emoji> Emoji { get; set; } | |||
| [JsonProperty("default")] | |||
| [JsonPropertyName("default")] | |||
| public Optional<bool> Default { get; set; } | |||
| public SelectMenuOption() { } | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API.Rest | |||
| { | |||
| internal class SessionStartLimit | |||
| { | |||
| [JsonProperty("total")] | |||
| [JsonPropertyName("total")] | |||
| public int Total { get; set; } | |||
| [JsonProperty("remaining")] | |||
| [JsonPropertyName("remaining")] | |||
| public int Remaining { get; set; } | |||
| [JsonProperty("reset_after")] | |||
| [JsonPropertyName("reset_after")] | |||
| public int ResetAfter { get; set; } | |||
| [JsonProperty("max_concurrency")] | |||
| [JsonPropertyName("max_concurrency")] | |||
| public int MaxConcurrency { get; set; } | |||
| } | |||
| } | |||
| @@ -1,25 +1,25 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class StageInstance | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public ulong GuildId { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public ulong ChannelId { get; set; } | |||
| [JsonProperty("topic")] | |||
| [JsonPropertyName("topic")] | |||
| public string Topic { get; set; } | |||
| [JsonProperty("privacy_level")] | |||
| [JsonPropertyName("privacy_level")] | |||
| public StagePrivacyLevel PrivacyLevel { get; set; } | |||
| [JsonProperty("discoverable_disabled")] | |||
| [JsonPropertyName("discoverable_disabled")] | |||
| public bool DiscoverableDisabled { get; set; } | |||
| } | |||
| } | |||
| @@ -1,30 +1,30 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Sticker | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("pack_id")] | |||
| [JsonPropertyName("pack_id")] | |||
| public ulong PackId { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty("tags")] | |||
| [JsonPropertyName("tags")] | |||
| public Optional<string> Tags { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public StickerType Type { get; set; } | |||
| [JsonProperty("format_type")] | |||
| [JsonPropertyName("format_type")] | |||
| public StickerFormatType FormatType { get; set; } | |||
| [JsonProperty("available")] | |||
| [JsonPropertyName("available")] | |||
| public bool? Available { get; set; } | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public Optional<ulong> GuildId { get; set; } | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public Optional<User> User { get; set; } | |||
| [JsonProperty("sort_value")] | |||
| [JsonPropertyName("sort_value")] | |||
| public int? SortValue { get; set; } | |||
| } | |||
| } | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class StickerItem | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("format_type")] | |||
| [JsonPropertyName("format_type")] | |||
| public StickerFormatType FormatType { get; set; } | |||
| } | |||
| } | |||
| @@ -1,22 +1,22 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class StickerPack | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("stickers")] | |||
| [JsonPropertyName("stickers")] | |||
| public Sticker[] Stickers { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("sku_id")] | |||
| [JsonPropertyName("sku_id")] | |||
| public ulong SkuId { get; set; } | |||
| [JsonProperty("cover_sticker_id")] | |||
| [JsonPropertyName("cover_sticker_id")] | |||
| public Optional<ulong> CoverStickerId { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty("banner_asset_id")] | |||
| [JsonPropertyName("banner_asset_id")] | |||
| public ulong BannerAssetId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,18 +1,18 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Team | |||
| { | |||
| [JsonProperty("icon")] | |||
| [JsonPropertyName("icon")] | |||
| public Optional<string> Icon { get; set; } | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("members")] | |||
| [JsonPropertyName("members")] | |||
| public TeamMember[] TeamMembers { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("owner_user_id")] | |||
| [JsonPropertyName("owner_user_id")] | |||
| public ulong OwnerUserId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,16 +1,16 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class TeamMember | |||
| { | |||
| [JsonProperty("membership_state")] | |||
| [JsonPropertyName("membership_state")] | |||
| public MembershipState MembershipState { get; set; } | |||
| [JsonProperty("permissions")] | |||
| [JsonPropertyName("permissions")] | |||
| public string[] Permissions { get; set; } | |||
| [JsonProperty("team_id")] | |||
| [JsonPropertyName("team_id")] | |||
| public ulong TeamId { get; set; } | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public User User { get; set; } | |||
| } | |||
| } | |||
| @@ -1,34 +1,34 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class TextInputComponent : IMessageComponent | |||
| { | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ComponentType Type { get; set; } | |||
| [JsonProperty("style")] | |||
| [JsonPropertyName("style")] | |||
| public TextInputStyle Style { get; set; } | |||
| [JsonProperty("custom_id")] | |||
| [JsonPropertyName("custom_id")] | |||
| public string CustomId { get; set; } | |||
| [JsonProperty("label")] | |||
| [JsonPropertyName("label")] | |||
| public string Label { get; set; } | |||
| [JsonProperty("placeholder")] | |||
| [JsonPropertyName("placeholder")] | |||
| public Optional<string> Placeholder { get; set; } | |||
| [JsonProperty("min_length")] | |||
| [JsonPropertyName("min_length")] | |||
| public Optional<int> MinLength { get; set; } | |||
| [JsonProperty("max_length")] | |||
| [JsonPropertyName("max_length")] | |||
| public Optional<int> MaxLength { get; set; } | |||
| [JsonProperty("value")] | |||
| [JsonPropertyName("value")] | |||
| public Optional<string> Value { get; set; } | |||
| [JsonProperty("required")] | |||
| [JsonPropertyName("required")] | |||
| public Optional<bool> Required { get; set; } | |||
| public TextInputComponent() { } | |||
| @@ -1,20 +1,20 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| namespace Discord.API | |||
| { | |||
| internal class ThreadMember | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public Optional<ulong> Id { get; set; } | |||
| [JsonProperty("user_id")] | |||
| [JsonPropertyName("user_id")] | |||
| public Optional<ulong> UserId { get; set; } | |||
| [JsonProperty("join_timestamp")] | |||
| [JsonPropertyName("join_timestamp")] | |||
| public DateTimeOffset JoinTimestamp { get; set; } | |||
| [JsonProperty("flags")] | |||
| [JsonPropertyName("flags")] | |||
| public int Flags { get; set; } // No enum type (yet?) | |||
| } | |||
| } | |||
| @@ -1,26 +1,26 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| namespace Discord.API | |||
| { | |||
| internal class ThreadMetadata | |||
| { | |||
| [JsonProperty("archived")] | |||
| [JsonPropertyName("archived")] | |||
| public bool Archived { get; set; } | |||
| [JsonProperty("auto_archive_duration")] | |||
| [JsonPropertyName("auto_archive_duration")] | |||
| public ThreadArchiveDuration AutoArchiveDuration { get; set; } | |||
| [JsonProperty("archive_timestamp")] | |||
| [JsonPropertyName("archive_timestamp")] | |||
| public DateTimeOffset ArchiveTimestamp { get; set; } | |||
| [JsonProperty("locked")] | |||
| [JsonPropertyName("locked")] | |||
| public Optional<bool> Locked { get; set; } | |||
| [JsonProperty("invitable")] | |||
| [JsonPropertyName("invitable")] | |||
| public Optional<bool> Invitable { get; set; } | |||
| [JsonProperty("create_timestamp")] | |||
| [JsonPropertyName("create_timestamp")] | |||
| public Optional<DateTimeOffset?> CreatedAt { get; set; } | |||
| } | |||
| } | |||
| @@ -1,38 +1,38 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class User | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("username")] | |||
| [JsonPropertyName("username")] | |||
| public Optional<string> Username { get; set; } | |||
| [JsonProperty("discriminator")] | |||
| [JsonPropertyName("discriminator")] | |||
| public Optional<string> Discriminator { get; set; } | |||
| [JsonProperty("bot")] | |||
| [JsonPropertyName("bot")] | |||
| public Optional<bool> Bot { get; set; } | |||
| [JsonProperty("avatar")] | |||
| [JsonPropertyName("avatar")] | |||
| public Optional<string> Avatar { get; set; } | |||
| [JsonProperty("banner")] | |||
| [JsonPropertyName("banner")] | |||
| public Optional<string> Banner { get; set; } | |||
| [JsonProperty("accent_color")] | |||
| [JsonPropertyName("accent_color")] | |||
| public Optional<uint?> AccentColor { get; set; } | |||
| //CurrentUser | |||
| [JsonProperty("verified")] | |||
| [JsonPropertyName("verified")] | |||
| public Optional<bool> Verified { get; set; } | |||
| [JsonProperty("email")] | |||
| [JsonPropertyName("email")] | |||
| public Optional<string> Email { get; set; } | |||
| [JsonProperty("mfa_enabled")] | |||
| [JsonPropertyName("mfa_enabled")] | |||
| public Optional<bool> MfaEnabled { get; set; } | |||
| [JsonProperty("flags")] | |||
| [JsonPropertyName("flags")] | |||
| public Optional<UserProperties> Flags { get; set; } | |||
| [JsonProperty("premium_type")] | |||
| [JsonPropertyName("premium_type")] | |||
| public Optional<PremiumType> PremiumType { get; set; } | |||
| [JsonProperty("locale")] | |||
| [JsonPropertyName("locale")] | |||
| public Optional<string> Locale { get; set; } | |||
| [JsonProperty("public_flags")] | |||
| [JsonPropertyName("public_flags")] | |||
| public Optional<UserProperties> PublicFlags { get; set; } | |||
| } | |||
| } | |||
| @@ -1,18 +1,18 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class UserGuild | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("icon")] | |||
| [JsonPropertyName("icon")] | |||
| public string Icon { get; set; } | |||
| [JsonProperty("owner")] | |||
| [JsonPropertyName("owner")] | |||
| public bool Owner { get; set; } | |||
| [JsonProperty("permissions"), Int53] | |||
| [JsonPropertyName("permissions"), Int53] | |||
| public string Permissions { get; set; } | |||
| } | |||
| } | |||
| @@ -1,20 +1,20 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class VoiceRegion | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public string Id { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("vip")] | |||
| [JsonPropertyName("vip")] | |||
| public bool IsVip { get; set; } | |||
| [JsonProperty("optimal")] | |||
| [JsonPropertyName("optimal")] | |||
| public bool IsOptimal { get; set; } | |||
| [JsonProperty("deprecated")] | |||
| [JsonPropertyName("deprecated")] | |||
| public bool IsDeprecated { get; set; } | |||
| [JsonProperty("custom")] | |||
| [JsonPropertyName("custom")] | |||
| public bool IsCustom { get; set; } | |||
| } | |||
| } | |||
| @@ -1,36 +1,36 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System; | |||
| namespace Discord.API | |||
| { | |||
| internal class VoiceState | |||
| { | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public ulong? GuildId { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public ulong? ChannelId { get; set; } | |||
| [JsonProperty("user_id")] | |||
| [JsonPropertyName("user_id")] | |||
| public ulong UserId { get; set; } | |||
| // ALWAYS sent over WebSocket, never on REST | |||
| [JsonProperty("member")] | |||
| [JsonPropertyName("member")] | |||
| public Optional<GuildMember> Member { get; set; } | |||
| [JsonProperty("session_id")] | |||
| [JsonPropertyName("session_id")] | |||
| public string SessionId { get; set; } | |||
| [JsonProperty("deaf")] | |||
| [JsonPropertyName("deaf")] | |||
| public bool Deaf { get; set; } | |||
| [JsonProperty("mute")] | |||
| [JsonPropertyName("mute")] | |||
| public bool Mute { get; set; } | |||
| [JsonProperty("self_deaf")] | |||
| [JsonPropertyName("self_deaf")] | |||
| public bool SelfDeaf { get; set; } | |||
| [JsonProperty("self_mute")] | |||
| [JsonPropertyName("self_mute")] | |||
| public bool SelfMute { get; set; } | |||
| [JsonProperty("suppress")] | |||
| [JsonPropertyName("suppress")] | |||
| public bool Suppress { get; set; } | |||
| [JsonProperty("self_stream")] | |||
| [JsonPropertyName("self_stream")] | |||
| public bool SelfStream { get; set; } | |||
| [JsonProperty("self_video")] | |||
| [JsonPropertyName("self_video")] | |||
| public bool SelfVideo { get; set; } | |||
| [JsonProperty("request_to_speak_timestamp")] | |||
| [JsonPropertyName("request_to_speak_timestamp")] | |||
| public Optional<DateTimeOffset?> RequestToSpeakTimestamp { get; set; } | |||
| } | |||
| } | |||
| @@ -1,26 +1,26 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API | |||
| { | |||
| internal class Webhook | |||
| { | |||
| [JsonProperty("id")] | |||
| [JsonPropertyName("id")] | |||
| public ulong Id { get; set; } | |||
| [JsonProperty("channel_id")] | |||
| [JsonPropertyName("channel_id")] | |||
| public ulong ChannelId { get; set; } | |||
| [JsonProperty("token")] | |||
| [JsonPropertyName("token")] | |||
| public string Token { get; set; } | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public Optional<string> Name { get; set; } | |||
| [JsonProperty("avatar")] | |||
| [JsonPropertyName("avatar")] | |||
| public Optional<string> Avatar { get; set; } | |||
| [JsonProperty("guild_id")] | |||
| [JsonPropertyName("guild_id")] | |||
| public Optional<ulong> GuildId { get; set; } | |||
| [JsonProperty("user")] | |||
| [JsonPropertyName("user")] | |||
| public Optional<User> Creator { get; set; } | |||
| [JsonProperty("application_id")] | |||
| [JsonPropertyName("application_id")] | |||
| public ulong? ApplicationId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,19 +1,19 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API.Rest | |||
| { | |||
| [JsonObject(MemberSerialization = MemberSerialization.OptIn)] | |||
| internal class AddGuildMemberParams | |||
| { | |||
| [JsonProperty("access_token")] | |||
| [JsonPropertyName("access_token")] | |||
| public string AccessToken { get; set; } | |||
| [JsonProperty("nick")] | |||
| [JsonPropertyName("nick")] | |||
| public Optional<string> Nickname { get; set; } | |||
| [JsonProperty("roles")] | |||
| [JsonPropertyName("roles")] | |||
| public Optional<ulong[]> RoleIds { get; set; } | |||
| [JsonProperty("mute")] | |||
| [JsonPropertyName("mute")] | |||
| public Optional<bool> IsMuted { get; set; } | |||
| [JsonProperty("deaf")] | |||
| [JsonPropertyName("deaf")] | |||
| public Optional<bool> IsDeafened { get; set; } | |||
| } | |||
| } | |||
| @@ -1,4 +1,4 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| using System.Collections; | |||
| using System.Collections.Generic; | |||
| using System.Collections.Immutable; | |||
| @@ -8,31 +8,31 @@ namespace Discord.API.Rest | |||
| { | |||
| internal class CreateApplicationCommandParams | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ApplicationCommandType Type { get; set; } | |||
| [JsonProperty("description")] | |||
| [JsonPropertyName("description")] | |||
| public string Description { get; set; } | |||
| [JsonProperty("options")] | |||
| [JsonPropertyName("options")] | |||
| public Optional<ApplicationCommandOption[]> Options { get; set; } | |||
| [JsonProperty("default_permission")] | |||
| [JsonPropertyName("default_permission")] | |||
| public Optional<bool> DefaultPermission { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| [JsonPropertyName("name_localizations")] | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("description_localizations")] | |||
| [JsonPropertyName("description_localizations")] | |||
| public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; } | |||
| [JsonProperty("dm_permission")] | |||
| [JsonPropertyName("dm_permission")] | |||
| public Optional<bool?> DmPermission { get; set; } | |||
| [JsonProperty("default_member_permissions")] | |||
| [JsonPropertyName("default_member_permissions")] | |||
| public Optional<GuildPermission?> DefaultMemberPermission { get; set; } | |||
| public CreateApplicationCommandParams() { } | |||
| @@ -1,23 +1,23 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API.Rest | |||
| { | |||
| [JsonObject(MemberSerialization = MemberSerialization.OptIn)] | |||
| internal class CreateChannelInviteParams | |||
| { | |||
| [JsonProperty("max_age")] | |||
| [JsonPropertyName("max_age")] | |||
| public Optional<int> MaxAge { get; set; } | |||
| [JsonProperty("max_uses")] | |||
| [JsonPropertyName("max_uses")] | |||
| public Optional<int> MaxUses { get; set; } | |||
| [JsonProperty("temporary")] | |||
| [JsonPropertyName("temporary")] | |||
| public Optional<bool> IsTemporary { get; set; } | |||
| [JsonProperty("unique")] | |||
| [JsonPropertyName("unique")] | |||
| public Optional<bool> IsUnique { get; set; } | |||
| [JsonProperty("target_type")] | |||
| [JsonPropertyName("target_type")] | |||
| public Optional<TargetUserType> TargetType { get; set; } | |||
| [JsonProperty("target_user_id")] | |||
| [JsonPropertyName("target_user_id")] | |||
| public Optional<ulong> TargetUserId { get; set; } | |||
| [JsonProperty("target_application_id")] | |||
| [JsonPropertyName("target_application_id")] | |||
| public Optional<ulong> TargetApplicationId { get; set; } | |||
| } | |||
| } | |||
| @@ -1,11 +1,11 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API.Rest | |||
| { | |||
| [JsonObject(MemberSerialization = MemberSerialization.OptIn)] | |||
| internal class CreateDMChannelParams | |||
| { | |||
| [JsonProperty("recipient_id")] | |||
| [JsonPropertyName("recipient_id")] | |||
| public ulong RecipientId { get; } | |||
| public CreateDMChannelParams(ulong recipientId) | |||
| @@ -1,33 +1,33 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API.Rest | |||
| { | |||
| [JsonObject(MemberSerialization = MemberSerialization.OptIn)] | |||
| internal class CreateGuildChannelParams | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; } | |||
| [JsonProperty("type")] | |||
| [JsonPropertyName("type")] | |||
| public ChannelType Type { get; } | |||
| [JsonProperty("parent_id")] | |||
| [JsonPropertyName("parent_id")] | |||
| public Optional<ulong?> CategoryId { get; set; } | |||
| [JsonProperty("position")] | |||
| [JsonPropertyName("position")] | |||
| public Optional<int> Position { get; set; } | |||
| [JsonProperty("permission_overwrites")] | |||
| [JsonPropertyName("permission_overwrites")] | |||
| public Optional<Overwrite[]> Overwrites { get; set; } | |||
| //Text channels | |||
| [JsonProperty("topic")] | |||
| [JsonPropertyName("topic")] | |||
| public Optional<string> Topic { get; set; } | |||
| [JsonProperty("nsfw")] | |||
| [JsonPropertyName("nsfw")] | |||
| public Optional<bool> IsNsfw { get; set; } | |||
| [JsonProperty("rate_limit_per_user")] | |||
| [JsonPropertyName("rate_limit_per_user")] | |||
| public Optional<int> SlowModeInterval { get; set; } | |||
| //Voice channels | |||
| [JsonProperty("bitrate")] | |||
| [JsonPropertyName("bitrate")] | |||
| public Optional<int> Bitrate { get; set; } | |||
| [JsonProperty("user_limit")] | |||
| [JsonPropertyName("user_limit")] | |||
| public Optional<int?> UserLimit { get; set; } | |||
| public CreateGuildChannelParams(string name, ChannelType type) | |||
| @@ -1,15 +1,15 @@ | |||
| using Newtonsoft.Json; | |||
| using System.Text.Json.Serialization; | |||
| namespace Discord.API.Rest | |||
| { | |||
| [JsonObject(MemberSerialization = MemberSerialization.OptIn)] | |||
| internal class CreateGuildEmoteParams | |||
| { | |||
| [JsonProperty("name")] | |||
| [JsonPropertyName("name")] | |||
| public string Name { get; set; } | |||
| [JsonProperty("image")] | |||
| [JsonPropertyName("image")] | |||
| public Image Image { get; set; } | |||
| [JsonProperty("roles")] | |||
| [JsonPropertyName("roles")] | |||
| public Optional<ulong[]> RoleIds { get; set; } | |||
| } | |||
| } | |||