SlashCommandBody

Struct SlashCommandBody 

Source
pub struct SlashCommandBody {
Show 15 fields pub token: String, pub command: String, pub text: String, pub response_url: String, pub trigger_id: String, pub user_id: String, pub user_name: String, pub team_id: String, pub team_domain: String, pub enterprise_id: Option<String>, pub enterprise_name: Option<String>, pub channel_id: String, pub channel_name: String, pub api_app_id: String, pub is_enterprise_install: bool,
}
Expand description

The type that represents a request of a slash command.

https://api.slack.com/interactivity/slash-commands#app_command_handling

Fields§

§token: String

(Deprecated) This is a verification token, a deprecated feature that you shouldn’t use any more.

§command: String

The command that was entered to trigger this request.

§text: String

This is the part of the slash command after the command itself, and it can contain absolutely anything the user might decide to type.

§response_url: String

A temporary webhook URL that you can use to generate message responses.

§trigger_id: String

A short-lived ID that will allow your app to open a modal.

§user_id: String

The ID of the user who triggered the command.

§user_name: String

(Deprecated) The plain text name of the user who triggered the command.

§team_id: String

These IDs provide context about where the user was in Slack when they triggered your app’s command (e.g. the workspace, Enterprise Grid, or channel).

§team_domain: String

(Deprecated)

§enterprise_id: Option<String>

These IDs provide context about where the user was in Slack when they triggered your app’s command (e.g. the workspace, Enterprise Grid, or channel).

§enterprise_name: Option<String>

(Deprecated)

§channel_id: String

These IDs provide context about where the user was in Slack when they triggered your app’s command (e.g. the workspace, Enterprise Grid, or channel).

§channel_name: String

(Deprecated)

§api_app_id: String

Your Slack app’s unique identifier.

§is_enterprise_install: bool

is_enterprise_install

Trait Implementations§

Source§

impl Clone for SlashCommandBody

Source§

fn clone(&self) -> SlashCommandBody

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SlashCommandBody

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SlashCommandBody

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<SlashCommandBody, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,