Fixing localizations (#2457)

* Fixing localizations

* Fixed typo in `SlashCommandOptionBuilder.WithDescriptionLocalizations`
* Fixed typo in `SlashCommandOptionBuilder.AddNameLocalization`
* Changed `Build` method of both `ApplicationCommandOptionProperties` and `SlashCommandProperties` to not set the `NameLocalizations` and `DescriptionLocalizations` if null in the builder. Was causing an error in the setter.

* Update SlashCommandBuilder.cs

Fixing a missing `;`

* Update SlashCommandBuilder.cs

* Fixing _another_ missing `;`

* Update SlashCommandBuilder.cs

* Fixed `SlashCommandOptionBuilder.AddChoiceInternal` to not pass null `NameLocalizations`

* Update SlashCommandBuilder.cs

* Fecking semi-colons

* Update SlashCommandBuilder.cs
This commit is contained in:
Proddy
2022-09-10 21:07:49 +01:00
committed by GitHub
parent 1b01fed867
commit d1678d1e8f

View File

@@ -933,7 +933,7 @@ namespace Discord
EnsureValidCommandOptionName(name);
_descriptionLocalizations ??= new();
_nameLocalizations ??= new();
_nameLocalizations.Add(locale, name);
return this;