diff --git a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs
index bf0437647..abee6cc4f 100644
--- a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs
@@ -30,7 +30,7 @@ namespace Discord
///
/// Gets or sets the localization dictionary for the name field of this command.
///
- public IReadOnlyDictionary? NameLocalizations
+ public IReadOnlyDictionary NameLocalizations
{
get => _nameLocalizations;
set
@@ -52,7 +52,7 @@ namespace Discord
///
/// Gets or sets the localization dictionary for the description field of this command.
///
- public IReadOnlyDictionary? DescriptionLocalizations
+ public IReadOnlyDictionary DescriptionLocalizations
{
get => _descriptionLocalizations;
set
diff --git a/src/Discord.Net.Core/Entities/Interactions/ContextMenus/MessageCommandBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/ContextMenus/MessageCommandBuilder.cs
index c1c143ed7..ca6995b69 100644
--- a/src/Discord.Net.Core/Entities/Interactions/ContextMenus/MessageCommandBuilder.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/ContextMenus/MessageCommandBuilder.cs
@@ -118,6 +118,7 @@ namespace Discord
}
_nameLocalizations = new Dictionary(nameLocalizations);
+ return this;
}
///
diff --git a/src/Discord.Net.Core/Entities/Interactions/ContextMenus/UserCommandBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/ContextMenus/UserCommandBuilder.cs
index eb0e9f23f..37469d6c3 100644
--- a/src/Discord.Net.Core/Entities/Interactions/ContextMenus/UserCommandBuilder.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/ContextMenus/UserCommandBuilder.cs
@@ -116,6 +116,7 @@ namespace Discord
}
_nameLocalizations = new Dictionary(nameLocalizations);
+ return this;
}
///
diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs
index 794edac61..6f9ce7a45 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs
@@ -55,12 +55,12 @@ namespace Discord
///
/// Gets the localization dictionary for the name field of this command.
///
- IReadOnlyDictionary? NameLocalizations { get; }
+ IReadOnlyDictionary NameLocalizations { get; }
///
/// Gets the localization dictionary for the description field of this command.
///
- IReadOnlyDictionary? DescriptionLocalizations { get; }
+ IReadOnlyDictionary DescriptionLocalizations { get; }
///
/// Gets the localized name of this command.
@@ -68,7 +68,7 @@ namespace Discord
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- string? NameLocalized { get; }
+ string NameLocalized { get; }
///
/// Gets the localized description of this command.
@@ -76,7 +76,7 @@ namespace Discord
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- string? DescriptionLocalized { get; }
+ string DescriptionLocalized { get; }
///
/// Modifies the current application command.
diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs
index f3064abda..72114fb53 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs
@@ -65,12 +65,12 @@ namespace Discord
///
/// Gets the localization dictionary for the name field of this command.
///
- IReadOnlyDictionary? NameLocalizations { get; }
+ IReadOnlyDictionary NameLocalizations { get; }
///
/// Gets the localization dictionary for the description field of this command.
///
- IReadOnlyDictionary? DescriptionLocalizations { get; }
+ IReadOnlyDictionary DescriptionLocalizations { get; }
///
/// Gets the localized name of this command.
@@ -78,7 +78,7 @@ namespace Discord
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- string? NameLocalized { get; }
+ string NameLocalized { get; }
///
/// Gets the localized description of this command.
@@ -86,6 +86,6 @@ namespace Discord
///
/// Only returned when the `withLocalizations` query parameter is set to true when requesting the command.
///
- string? DescriptionLocalized { get; }
+ string DescriptionLocalized { get; }
}
}
diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs
index 4d420cc9e..df52f9cd6 100644
--- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs
+++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs
@@ -20,7 +20,7 @@ namespace Discord
///
/// Gets the localization dictionary for the name field of this command.
///
- IReadOnlyDictionary? NameLocalizations { get; }
+ IReadOnlyDictionary NameLocalizations { get; }
///
/// Gets the localized name of this command.
@@ -28,6 +28,6 @@ namespace Discord
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- string? NameLocalized { get; }
+ string NameLocalized { get; }
}
}
diff --git a/src/Discord.Net.Core/RequestOptions.cs b/src/Discord.Net.Core/RequestOptions.cs
index 2fee0ae6e..ef8dbf756 100644
--- a/src/Discord.Net.Core/RequestOptions.cs
+++ b/src/Discord.Net.Core/RequestOptions.cs
@@ -65,8 +65,6 @@ namespace Discord
///
public Func RatelimitCallback { get; set; }
- public IEnumerable>> RequestHeaders { get; } = new Dictionary>();
-
internal bool IgnoreState { get; set; }
internal BucketId BucketId { get; set; }
internal bool IsClientBucket { get; set; }
diff --git a/src/Discord.Net.Rest/API/Common/ApplicationCommand.cs b/src/Discord.Net.Rest/API/Common/ApplicationCommand.cs
index c0dec1f89..e46369277 100644
--- a/src/Discord.Net.Rest/API/Common/ApplicationCommand.cs
+++ b/src/Discord.Net.Rest/API/Common/ApplicationCommand.cs
@@ -27,16 +27,16 @@ namespace Discord.API
public Optional DefaultPermissions { get; set; }
[JsonProperty("name_localizations")]
- public Optional?> NameLocalizations { get; set; }
+ public Optional> NameLocalizations { get; set; }
[JsonProperty("description_localizations")]
- public Optional?> DescriptionLocalizations { get; set; }
+ public Optional> DescriptionLocalizations { get; set; }
[JsonProperty("name_localized")]
- public Optional NameLocalized { get; set; }
+ public Optional NameLocalized { get; set; }
[JsonProperty("description_localized")]
- public Optional DescriptionLocalized { get; set; }
+ public Optional DescriptionLocalized { get; set; }
// V2 Permissions
[JsonProperty("dm_permission")]
diff --git a/src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs b/src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs
index f44331d58..0ec2025fa 100644
--- a/src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs
+++ b/src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs
@@ -40,16 +40,16 @@ namespace Discord.API
public Optional ChannelTypes { get; set; }
[JsonProperty("name_localizations")]
- public Optional?> NameLocalizations { get; set; }
+ public Optional> NameLocalizations { get; set; }
[JsonProperty("description_localizations")]
- public Optional?> DescriptionLocalizations { get; set; }
+ public Optional> DescriptionLocalizations { get; set; }
[JsonProperty("name_localized")]
- public Optional NameLocalized { get; set; }
+ public Optional NameLocalized { get; set; }
[JsonProperty("description_localized")]
- public Optional DescriptionLocalized { get; set; }
+ public Optional DescriptionLocalized { get; set; }
public ApplicationCommandOption() { }
diff --git a/src/Discord.Net.Rest/API/Common/ApplicationCommandOptionChoice.cs b/src/Discord.Net.Rest/API/Common/ApplicationCommandOptionChoice.cs
index 8662b2729..966405cc9 100644
--- a/src/Discord.Net.Rest/API/Common/ApplicationCommandOptionChoice.cs
+++ b/src/Discord.Net.Rest/API/Common/ApplicationCommandOptionChoice.cs
@@ -12,9 +12,9 @@ namespace Discord.API
public object Value { get; set; }
[JsonProperty("name_localizations")]
- public Optional?> NameLocalizations { get; set; }
+ public Optional> NameLocalizations { get; set; }
[JsonProperty("name_localized")]
- public Optional NameLocalized { get; set; }
+ public Optional NameLocalized { get; set; }
}
}
diff --git a/src/Discord.Net.Rest/API/Rest/CreateApplicationCommandParams.cs b/src/Discord.Net.Rest/API/Rest/CreateApplicationCommandParams.cs
index 4113d3311..2257d4b97 100644
--- a/src/Discord.Net.Rest/API/Rest/CreateApplicationCommandParams.cs
+++ b/src/Discord.Net.Rest/API/Rest/CreateApplicationCommandParams.cs
@@ -24,10 +24,10 @@ namespace Discord.API.Rest
public Optional DefaultPermission { get; set; }
[JsonProperty("name_localizations")]
- public Optional?> NameLocalizations { get; set; }
+ public Optional> NameLocalizations { get; set; }
[JsonProperty("description_localizations")]
- public Optional?> DescriptionLocalizations { get; set; }
+ public Optional> DescriptionLocalizations { get; set; }
[JsonProperty("dm_permission")]
public Optional 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?>.Unspecified;
- DescriptionLocalizations = descriptionLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional?>.Unspecified;
+ NameLocalizations = nameLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional>.Unspecified;
+ DescriptionLocalizations = descriptionLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional>.Unspecified;
}
}
}
diff --git a/src/Discord.Net.Rest/API/Rest/ModifyApplicationCommandParams.cs b/src/Discord.Net.Rest/API/Rest/ModifyApplicationCommandParams.cs
index 44836baea..f49a3f33d 100644
--- a/src/Discord.Net.Rest/API/Rest/ModifyApplicationCommandParams.cs
+++ b/src/Discord.Net.Rest/API/Rest/ModifyApplicationCommandParams.cs
@@ -18,9 +18,9 @@ namespace Discord.API.Rest
public Optional DefaultPermission { get; set; }
[JsonProperty("name_localizations")]
- public Optional?> NameLocalizations { get; set; }
+ public Optional> NameLocalizations { get; set; }
[JsonProperty("description_localizations")]
- public Optional?> DescriptionLocalizations { get; set; }
+ public Optional> DescriptionLocalizations { get; set; }
}
}
diff --git a/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs b/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs
index cfe8b4ecd..de1ef3149 100644
--- a/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs
+++ b/src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs
@@ -103,7 +103,7 @@ namespace Discord.Rest
? arg.IsDefaultPermission.Value
: Optional.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.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.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.Unspecified,
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
- DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary()
+ DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),
// TODO: better conversion to nullable optionals
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),
diff --git a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs
index 2a44f7ef1..468d10712 100644
--- a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs
+++ b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs
@@ -41,12 +41,12 @@ namespace Discord.Rest
///
/// Gets the localization dictionary for the name field of this command.
///
- public IReadOnlyDictionary? NameLocalizations { get; private set; }
+ public IReadOnlyDictionary NameLocalizations { get; private set; }
///
/// Gets the localization dictionary for the description field of this command.
///
- public IReadOnlyDictionary? DescriptionLocalizations { get; private set; }
+ public IReadOnlyDictionary DescriptionLocalizations { get; private set; }
///
/// Gets the localized name of this command.
@@ -54,7 +54,7 @@ namespace Discord.Rest
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? NameLocalized { get; private set; }
+ public string NameLocalized { get; private set; }
///
/// Gets the localized description of this command.
@@ -62,7 +62,7 @@ namespace Discord.Rest
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? DescriptionLocalized { get; private set; }
+ public string DescriptionLocalized { get; private set; }
///
public DateTimeOffset CreatedAt
diff --git a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandChoice.cs b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandChoice.cs
index 14e1e33ab..b736c435d 100644
--- a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandChoice.cs
+++ b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandChoice.cs
@@ -18,7 +18,7 @@ namespace Discord.Rest
///
/// Gets the localization dictionary for the name field of this command option choice.
///
- public IReadOnlyDictionary? NameLocalizations { get; }
+ public IReadOnlyDictionary NameLocalizations { get; }
///
/// Gets the localized name of this command option choice.
@@ -26,7 +26,7 @@ namespace Discord.Rest
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? NameLocalized { get; }
+ public string NameLocalized { get; }
internal RestApplicationCommandChoice(Model model)
{
diff --git a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs
index d566de869..751b0c213 100644
--- a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs
+++ b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs
@@ -51,12 +51,12 @@ namespace Discord.Rest
///
/// Gets the localization dictionary for the name field of this command option.
///
- public IReadOnlyDictionary? NameLocalizations { get; private set; }
+ public IReadOnlyDictionary NameLocalizations { get; private set; }
///
/// Gets the localization dictionary for the description field of this command option.
///
- public IReadOnlyDictionary? DescriptionLocalizations { get; private set; }
+ public IReadOnlyDictionary DescriptionLocalizations { get; private set; }
///
/// Gets the localized name of this command option.
@@ -64,7 +64,7 @@ namespace Discord.Rest
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? NameLocalized { get; private set; }
+ public string NameLocalized { get; private set; }
///
/// Gets the localized description of this command option.
@@ -72,7 +72,7 @@ namespace Discord.Rest
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? DescriptionLocalized { get; private set; }
+ public string DescriptionLocalized { get; private set; }
internal RestApplicationCommandOption() { }
diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs
index a54788d2c..8c0fca90b 100644
--- a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs
+++ b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs
@@ -53,12 +53,12 @@ namespace Discord.WebSocket
///
/// Gets the localization dictionary for the name field of this command.
///
- public IReadOnlyDictionary? NameLocalizations { get; private set; }
+ public IReadOnlyDictionary NameLocalizations { get; private set; }
///
/// Gets the localization dictionary for the description field of this command.
///
- public IReadOnlyDictionary? DescriptionLocalizations { get; private set; }
+ public IReadOnlyDictionary DescriptionLocalizations { get; private set; }
///
/// Gets the localized name of this command.
@@ -66,7 +66,7 @@ namespace Discord.WebSocket
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? NameLocalized { get; private set; }
+ public string NameLocalized { get; private set; }
///
/// Gets the localized description of this command.
@@ -74,7 +74,7 @@ namespace Discord.WebSocket
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? DescriptionLocalized { get; private set; }
+ public string DescriptionLocalized { get; private set; }
///
public DateTimeOffset CreatedAt
diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandChoice.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandChoice.cs
index 83b75d060..4da1eaadb 100644
--- a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandChoice.cs
+++ b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandChoice.cs
@@ -18,7 +18,7 @@ namespace Discord.WebSocket
///
/// Gets the localization dictionary for the name field of this command option choice.
///
- public IReadOnlyDictionary? NameLocalizations { get; private set; }
+ public IReadOnlyDictionary NameLocalizations { get; private set; }
///
/// Gets the localized name of this command option choice.
@@ -26,7 +26,7 @@ namespace Discord.WebSocket
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? NameLocalized { get; private set; }
+ public string NameLocalized { get; private set; }
internal SocketApplicationCommandChoice() { }
internal static SocketApplicationCommandChoice Create(Model model)
diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs
index 38cb92e03..a20b4e906 100644
--- a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs
+++ b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs
@@ -51,12 +51,12 @@ namespace Discord.WebSocket
///
/// Gets the localization dictionary for the name field of this command option.
///
- public IReadOnlyDictionary? NameLocalizations { get; private set; }
+ public IReadOnlyDictionary NameLocalizations { get; private set; }
///
/// Gets the localization dictionary for the description field of this command option.
///
- public IReadOnlyDictionary? DescriptionLocalizations { get; private set; }
+ public IReadOnlyDictionary DescriptionLocalizations { get; private set; }
///
/// Gets the localized name of this command option.
@@ -64,7 +64,7 @@ namespace Discord.WebSocket
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? NameLocalized { get; private set; }
+ public string NameLocalized { get; private set; }
///
/// Gets the localized description of this command option.
@@ -72,7 +72,7 @@ namespace Discord.WebSocket
///
/// Only returned when the `withLocalizations` query parameter is set to when requesting the command.
///
- public string? DescriptionLocalized { get; private set; }
+ public string DescriptionLocalized { get; private set; }
internal SocketApplicationCommandOption() { }
internal static SocketApplicationCommandOption Create(Model model)