Skip to content

Commit

Permalink
Introduce a separate data type for autocomplete interactions
Browse files Browse the repository at this point in the history
The interaction payload for autocompletes is slightly different. It's
missing the `resolved` data map and reports only for the current
autocompleted option value the `focused` field and its value as a string.

The focused option value is modeled as an enum variant of `CommandDataOptionValue`.

```
enum CommandDataOptionValue {
    Autocomplete { name: String, kind: CommandOptionType, value: String },
}
```

The focused option value can be retrieved via `AutocompleteData::focused_option()`
from the `AutocompleteData::options` vector.
  • Loading branch information
nickelc committed Jun 5, 2022
1 parent 8bde9d4 commit e431fbe
Showing 1 changed file with 428 additions and 6 deletions.
Loading

0 comments on commit e431fbe

Please sign in to comment.