| @@ -30,7 +30,7 @@ namespace Discord | |||
| /// <summary> | |||
| /// Gets or sets the localization dictionary for the name field of this command. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? NameLocalizations | |||
| public IReadOnlyDictionary<string, string> NameLocalizations | |||
| { | |||
| get => _nameLocalizations; | |||
| set | |||
| @@ -52,7 +52,7 @@ namespace Discord | |||
| /// <summary> | |||
| /// Gets or sets the localization dictionary for the description field of this command. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? DescriptionLocalizations | |||
| public IReadOnlyDictionary<string, string> DescriptionLocalizations | |||
| { | |||
| get => _descriptionLocalizations; | |||
| set | |||
| @@ -118,6 +118,7 @@ namespace Discord | |||
| } | |||
| _nameLocalizations = new Dictionary<string, string>(nameLocalizations); | |||
| return this; | |||
| } | |||
| /// <summary> | |||
| @@ -116,6 +116,7 @@ namespace Discord | |||
| } | |||
| _nameLocalizations = new Dictionary<string, string>(nameLocalizations); | |||
| return this; | |||
| } | |||
| /// <summary> | |||
| @@ -55,12 +55,12 @@ namespace Discord | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command. | |||
| /// </summary> | |||
| IReadOnlyDictionary<string, string>? NameLocalizations { get; } | |||
| IReadOnlyDictionary<string, string> NameLocalizations { get; } | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the description field of this command. | |||
| /// </summary> | |||
| IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; } | |||
| IReadOnlyDictionary<string, string> DescriptionLocalizations { get; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command. | |||
| @@ -68,7 +68,7 @@ namespace Discord | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| string? NameLocalized { get; } | |||
| string NameLocalized { get; } | |||
| /// <summary> | |||
| /// Gets the localized description of this command. | |||
| @@ -76,7 +76,7 @@ namespace Discord | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| string? DescriptionLocalized { get; } | |||
| string DescriptionLocalized { get; } | |||
| /// <summary> | |||
| /// Modifies the current application command. | |||
| @@ -65,12 +65,12 @@ namespace Discord | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command. | |||
| /// </summary> | |||
| IReadOnlyDictionary<string, string>? NameLocalizations { get; } | |||
| IReadOnlyDictionary<string, string> NameLocalizations { get; } | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the description field of this command. | |||
| /// </summary> | |||
| IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; } | |||
| IReadOnlyDictionary<string, string> DescriptionLocalizations { get; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command. | |||
| @@ -78,7 +78,7 @@ namespace Discord | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| string? NameLocalized { get; } | |||
| string NameLocalized { get; } | |||
| /// <summary> | |||
| /// Gets the localized description of this command. | |||
| @@ -86,6 +86,6 @@ namespace Discord | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to true when requesting the command. | |||
| /// </remarks> | |||
| string? DescriptionLocalized { get; } | |||
| string DescriptionLocalized { get; } | |||
| } | |||
| } | |||
| @@ -20,7 +20,7 @@ namespace Discord | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command. | |||
| /// </summary> | |||
| IReadOnlyDictionary<string, string>? NameLocalizations { get; } | |||
| IReadOnlyDictionary<string, string> NameLocalizations { get; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command. | |||
| @@ -28,6 +28,6 @@ namespace Discord | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| string? NameLocalized { get; } | |||
| string NameLocalized { get; } | |||
| } | |||
| } | |||
| @@ -65,8 +65,6 @@ namespace Discord | |||
| /// </summary> | |||
| public Func<IRateLimitInfo, Task> RatelimitCallback { get; set; } | |||
| public IEnumerable<KeyValuePair<string, IEnumerable<string>>> RequestHeaders { get; } = new Dictionary<string, IEnumerable<string>>(); | |||
| internal bool IgnoreState { get; set; } | |||
| internal BucketId BucketId { get; set; } | |||
| internal bool IsClientBucket { get; set; } | |||
| @@ -27,16 +27,16 @@ namespace Discord.API | |||
| public Optional<bool> DefaultPermissions { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| public Optional<Dictionary<string, string>?> NameLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("description_localizations")] | |||
| public Optional<Dictionary<string, string>?> DescriptionLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; } | |||
| [JsonProperty("name_localized")] | |||
| public Optional<string?> NameLocalized { get; set; } | |||
| public Optional<string> NameLocalized { get; set; } | |||
| [JsonProperty("description_localized")] | |||
| public Optional<string?> DescriptionLocalized { get; set; } | |||
| public Optional<string> DescriptionLocalized { get; set; } | |||
| // V2 Permissions | |||
| [JsonProperty("dm_permission")] | |||
| @@ -40,16 +40,16 @@ namespace Discord.API | |||
| public Optional<ChannelType[]> ChannelTypes { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| public Optional<Dictionary<string, string>?> NameLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("description_localizations")] | |||
| public Optional<Dictionary<string, string>?> DescriptionLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; } | |||
| [JsonProperty("name_localized")] | |||
| public Optional<string?> NameLocalized { get; set; } | |||
| public Optional<string> NameLocalized { get; set; } | |||
| [JsonProperty("description_localized")] | |||
| public Optional<string?> DescriptionLocalized { get; set; } | |||
| public Optional<string> DescriptionLocalized { get; set; } | |||
| public ApplicationCommandOption() { } | |||
| @@ -12,9 +12,9 @@ namespace Discord.API | |||
| public object Value { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| public Optional<Dictionary<string, string>?> NameLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("name_localized")] | |||
| public Optional<string?> NameLocalized { get; set; } | |||
| public Optional<string> NameLocalized { get; set; } | |||
| } | |||
| } | |||
| @@ -24,10 +24,10 @@ namespace Discord.API.Rest | |||
| public Optional<bool> DefaultPermission { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| public Optional<Dictionary<string, string>?> NameLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("description_localizations")] | |||
| public Optional<Dictionary<string, string>?> DescriptionLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; } | |||
| [JsonProperty("dm_permission")] | |||
| public Optional<bool?> DmPermission { get; set; } | |||
| @@ -43,8 +43,8 @@ namespace Discord.API.Rest | |||
| Description = description; | |||
| Options = Optional.Create(options); | |||
| Type = type; | |||
| NameLocalizations = nameLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional<Dictionary<string, string>?>.Unspecified; | |||
| DescriptionLocalizations = descriptionLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional<Dictionary<string, string>?>.Unspecified; | |||
| NameLocalizations = nameLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional<Dictionary<string, string>>.Unspecified; | |||
| DescriptionLocalizations = descriptionLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional<Dictionary<string, string>>.Unspecified; | |||
| } | |||
| } | |||
| } | |||
| @@ -18,9 +18,9 @@ namespace Discord.API.Rest | |||
| public Optional<bool> DefaultPermission { get; set; } | |||
| [JsonProperty("name_localizations")] | |||
| public Optional<Dictionary<string, string>?> NameLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> NameLocalizations { get; set; } | |||
| [JsonProperty("description_localizations")] | |||
| public Optional<Dictionary<string, string>?> DescriptionLocalizations { get; set; } | |||
| public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; } | |||
| } | |||
| } | |||
| @@ -103,7 +103,7 @@ namespace Discord.Rest | |||
| ? arg.IsDefaultPermission.Value | |||
| : Optional<bool>.Unspecified, | |||
| NameLocalizations = arg.NameLocalizations?.ToDictionary(), | |||
| DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary() | |||
| DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(), | |||
| // TODO: better conversion to nullable optionals | |||
| DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(), | |||
| @@ -143,7 +143,7 @@ namespace Discord.Rest | |||
| ? arg.IsDefaultPermission.Value | |||
| : Optional<bool>.Unspecified, | |||
| NameLocalizations = arg.NameLocalizations?.ToDictionary(), | |||
| DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary() | |||
| DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(), | |||
| // TODO: better conversion to nullable optionals | |||
| DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(), | |||
| @@ -188,7 +188,7 @@ namespace Discord.Rest | |||
| ? arg.IsDefaultPermission.Value | |||
| : Optional<bool>.Unspecified, | |||
| NameLocalizations = arg.NameLocalizations?.ToDictionary(), | |||
| DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary() | |||
| DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(), | |||
| // TODO: better conversion to nullable optionals | |||
| DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(), | |||
| @@ -310,7 +310,7 @@ namespace Discord.Rest | |||
| ? arg.IsDefaultPermission.Value | |||
| : Optional<bool>.Unspecified, | |||
| NameLocalizations = arg.NameLocalizations?.ToDictionary(), | |||
| DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary() | |||
| DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(), | |||
| // TODO: better conversion to nullable optionals | |||
| DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(), | |||
| @@ -41,12 +41,12 @@ namespace Discord.Rest | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the description field of this command. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command. | |||
| @@ -54,7 +54,7 @@ namespace Discord.Rest | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? NameLocalized { get; private set; } | |||
| public string NameLocalized { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized description of this command. | |||
| @@ -62,7 +62,7 @@ namespace Discord.Rest | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? DescriptionLocalized { get; private set; } | |||
| public string DescriptionLocalized { get; private set; } | |||
| /// <inheritdoc/> | |||
| public DateTimeOffset CreatedAt | |||
| @@ -18,7 +18,7 @@ namespace Discord.Rest | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command option choice. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? NameLocalizations { get; } | |||
| public IReadOnlyDictionary<string, string> NameLocalizations { get; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command option choice. | |||
| @@ -26,7 +26,7 @@ namespace Discord.Rest | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? NameLocalized { get; } | |||
| public string NameLocalized { get; } | |||
| internal RestApplicationCommandChoice(Model model) | |||
| { | |||
| @@ -51,12 +51,12 @@ namespace Discord.Rest | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command option. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the description field of this command option. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command option. | |||
| @@ -64,7 +64,7 @@ namespace Discord.Rest | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? NameLocalized { get; private set; } | |||
| public string NameLocalized { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized description of this command option. | |||
| @@ -72,7 +72,7 @@ namespace Discord.Rest | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? DescriptionLocalized { get; private set; } | |||
| public string DescriptionLocalized { get; private set; } | |||
| internal RestApplicationCommandOption() { } | |||
| @@ -53,12 +53,12 @@ namespace Discord.WebSocket | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the description field of this command. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command. | |||
| @@ -66,7 +66,7 @@ namespace Discord.WebSocket | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? NameLocalized { get; private set; } | |||
| public string NameLocalized { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized description of this command. | |||
| @@ -74,7 +74,7 @@ namespace Discord.WebSocket | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? DescriptionLocalized { get; private set; } | |||
| public string DescriptionLocalized { get; private set; } | |||
| /// <inheritdoc/> | |||
| public DateTimeOffset CreatedAt | |||
| @@ -18,7 +18,7 @@ namespace Discord.WebSocket | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command option choice. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command option choice. | |||
| @@ -26,7 +26,7 @@ namespace Discord.WebSocket | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? NameLocalized { get; private set; } | |||
| public string NameLocalized { get; private set; } | |||
| internal SocketApplicationCommandChoice() { } | |||
| internal static SocketApplicationCommandChoice Create(Model model) | |||
| @@ -51,12 +51,12 @@ namespace Discord.WebSocket | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the name field of this command option. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localization dictionary for the description field of this command option. | |||
| /// </summary> | |||
| public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; private set; } | |||
| public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized name of this command option. | |||
| @@ -64,7 +64,7 @@ namespace Discord.WebSocket | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? NameLocalized { get; private set; } | |||
| public string NameLocalized { get; private set; } | |||
| /// <summary> | |||
| /// Gets the localized description of this command option. | |||
| @@ -72,7 +72,7 @@ namespace Discord.WebSocket | |||
| /// <remarks> | |||
| /// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command. | |||
| /// </remarks> | |||
| public string? DescriptionLocalized { get; private set; } | |||
| public string DescriptionLocalized { get; private set; } | |||
| internal SocketApplicationCommandOption() { } | |||
| internal static SocketApplicationCommandOption Create(Model model) | |||