Browse Source

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
tags/3.8.1
Proddy GitHub 2 years ago
parent
commit
d1678d1e8f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs

+ 1
- 1
src/Discord.Net.Core/Entities/Interactions/SlashCommands/SlashCommandBuilder.cs View File

@@ -933,7 +933,7 @@ namespace Discord

EnsureValidCommandOptionName(name);

_descriptionLocalizations ??= new();
_nameLocalizations ??= new();
_nameLocalizations.Add(locale, name);

return this;


Loading…
Cancel
Save