pub struct CommandData {
pub guild_id: Option<Id<GuildMarker>>,
pub id: Id<CommandMarker>,
pub name: String,
pub kind: CommandType,
pub options: Vec<CommandDataOption>,
pub resolved: Option<CommandInteractionDataResolved>,
pub target_id: Option<Id<GenericMarker>>,
}Expand description
Data received when an ApplicationCommand or ApplicationCommandAutocomplete
interaction is executed.
Fields§
§guild_id: Option<Id<GuildMarker>>ID of the guild the command is registered to.
id: Id<CommandMarker>ID of the command.
name: StringName of the command.
kind: CommandTypeType of the command.
options: Vec<CommandDataOption>List of options specified by the user.
resolved: Option<CommandInteractionDataResolved>Resolved data from the interaction’s options.
target_id: Option<Id<GenericMarker>>If this is a user or message command, the ID of the targeted user/message.
Trait Implementations§
source§impl Clone for CommandData
impl Clone for CommandData
source§fn clone(&self) -> CommandData
fn clone(&self) -> CommandData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for CommandData
impl Debug for CommandData
source§impl<'de> Deserialize<'de> for CommandData
impl<'de> Deserialize<'de> for CommandData
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<CommandData> for CommandData
impl PartialEq<CommandData> for CommandData
source§fn eq(&self, other: &CommandData) -> bool
fn eq(&self, other: &CommandData) -> bool
This method tests for
self and other values to be equal, and is used
by ==.