Browse Source

Fix #208

pull/1923/head
quin lynch 3 years ago
parent
commit
efc4cb4459
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteractionData.cs

+ 3
- 0
src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketAutocompleteInteractionData.cs View File

@@ -51,6 +51,9 @@ namespace Discord.WebSocket
Current = options.FirstOrDefault(x => x.Focused); Current = options.FirstOrDefault(x => x.Focused);
Options = options.ToImmutableArray(); Options = options.ToImmutableArray();


if (Options?.Count == 1 && Current == null)
Current = Options.FirstOrDefault();

CommandName = model.Name; CommandName = model.Name;
CommandId = model.Id; CommandId = model.Id;
Type = model.Type; Type = model.Type;


Loading…
Cancel
Save