Struct twilight_http::request::application::CreateGuildCommand [−][src]
pub struct CreateGuildCommand<'a> { /* fields omitted */ }
Expand description
Create a new command in a guild.
The name must be between 3 and 32 characters in length, and the description must be between 1 and 100 characters in length. Creating a guild command with the same name as an already-existing guild command in the same guild will overwrite the old command. See the discord docs for more information.
Implementations
Whether the command is enabled by default when the app is added to a guild.
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.
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>;
Notable traits for ResponseFuture<T>
impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.