Browse Source

add choice localization

pull/2211/head
Cenngo 3 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 Choices = parameterInfo.Choices?.Select(x => new ApplicationCommandOptionChoiceProperties
{ {
Name = x.Name, Name = x.Name,
Value = x.Value
Value = x.Value,
NameLocalizations = localizationManager?.GetAllNames(parameterInfo.GetChoicePath(x), LocalizationTarget.Choice) ?? ImmutableDictionary<string, string>.Empty
})?.ToList(), })?.ToList(),
ChannelTypes = parameterInfo.ChannelTypes?.ToList(), ChannelTypes = parameterInfo.ChannelTypes?.ToList(),
IsAutocomplete = parameterInfo.IsAutocomplete, IsAutocomplete = parameterInfo.IsAutocomplete,


Loading…
Cancel
Save