1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use crate::{
application::{
command::CommandType,
interaction::{
application_command::CommandInteractionDataResolved,
application_command_autocomplete::ApplicationCommandAutocompleteDataOption,
},
},
id::{marker::CommandMarker, Id},
};
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct ApplicationCommandAutocompleteData {
pub id: Id<CommandMarker>,
pub name: String,
#[serde(rename = "type")]
pub kind: CommandType,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub options: Vec<ApplicationCommandAutocompleteDataOption>,
#[serde(skip_serializing_if = "Option::is_none")]
pub resolved: Option<CommandInteractionDataResolved>,
}