From d1678d1e8f607a0852e496d1db3ee509c279efbb Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 10 Sep 2022 21:07:49 +0100 Subject: [PATCH] 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 --- .../Entities/Interactions/SlashCommands/SlashCommandBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs index 94f5956dd..03fb24c8b 100644 --- a/src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs +++ b/src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs @@ -933,7 +933,7 @@ namespace Discord EnsureValidCommandOptionName(name); - _descriptionLocalizations ??= new(); + _nameLocalizations ??= new(); _nameLocalizations.Add(locale, name); return this;