Browse Source

add choice localization

pull/2211/head
Cenngo 2 years ago
parent
commit
d033d7eb45
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/Discord.Net.Interactions/Utilities/ApplicationCommandRestUtil.cs

+ 2
- 1
src/Discord.Net.Interactions/Utilities/ApplicationCommandRestUtil.cs View File

@@ -22,7 +22,8 @@ namespace Discord.Interactions
Choices = parameterInfo.Choices?.Select(x => new ApplicationCommandOptionChoiceProperties
{
Name = x.Name,
Value = x.Value
Value = x.Value,
NameLocalizations = localizationManager?.GetAllNames(parameterInfo.GetChoicePath(x), LocalizationTarget.Choice) ?? ImmutableDictionary<string, string>.Empty
})?.ToList(),
ChannelTypes = parameterInfo.ChannelTypes?.ToList(),
IsAutocomplete = parameterInfo.IsAutocomplete,


Loading…
Cancel
Save