Struct twilight_http::request::application::command::create_global_command::CreateGlobalChatInputCommand [−][src]
pub struct CreateGlobalChatInputCommand<'a> { /* fields omitted */ }
Expand description
Create a new chat input global command.
The description must be between 1 and 100 characters in length. Creating a command with the same name as an already-existing global command will overwrite the old command. See the discord docs for more information.
Implementations
pub const fn command_options(
self,
options: &'a [CommandOption]
) -> Result<Self, InteractionError>
pub const fn command_options(
self,
options: &'a [CommandOption]
) -> Result<Self, InteractionError>
Add a list of command options.
Required command options must be added before optional options.
Errors
Returns an InteractionErrorType::CommandOptionsRequiredFirst
if a required option was added after an optional option. The problem
option’s index is provided.
Whether the command is enabled by default when the app is added to a guild.
pub fn exec(self) -> ResponseFuture<Command>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Command>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for CreateGlobalChatInputCommand<'a>
impl<'a> Send for CreateGlobalChatInputCommand<'a>
impl<'a> Sync for CreateGlobalChatInputCommand<'a>
impl<'a> Unpin for CreateGlobalChatInputCommand<'a>
impl<'a> !UnwindSafe for CreateGlobalChatInputCommand<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more