pub struct CreateGuildCommand<'a> { /* private fields */ }
Expand description
Create a new command in a guild.
Implementations§
source§impl<'a> CreateGuildCommand<'a>
impl<'a> CreateGuildCommand<'a>
sourcepub fn chat_input(
self,
name: &'a str,
description: &'a str,
) -> CreateGuildChatInputCommand<'a>
pub fn chat_input( self, name: &'a str, description: &'a str, ) -> CreateGuildChatInputCommand<'a>
Create a chat input command in a guild.
The command name must only contain alphanumeric characters and lowercase
variants must be used where possible. Special characters -
and _
are
allowed. 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 Discord Docs/Create Guild Application Command.
§Errors
Returns an error of type NameLengthInvalid
or NameCharacterInvalid
if the command name is invalid.
Returns an error of type DescriptionInvalid
error type if the
command description is not between 1 and 100 characters.
sourcepub fn message(self, name: &'a str) -> CreateGuildMessageCommand<'a>
pub fn message(self, name: &'a str) -> CreateGuildMessageCommand<'a>
Create a message command in a guild.
Creating a guild command with the same name as an already-existing guild command in the same guild will overwrite the old command. See Discord Docs/Create Guild Application Command.
§Errors
Returns an error of type NameLengthInvalid
if the command name is
not between 1 and 32 characters.
sourcepub fn user(self, name: &'a str) -> CreateGuildUserCommand<'a>
pub fn user(self, name: &'a str) -> CreateGuildUserCommand<'a>
Create a user command in a guild.
Creating a guild command with the same name as an already-existing guild command in the same guild will overwrite the old command. See Discord Docs/Create Guild Application Command.
§Errors
Returns an error of type NameLengthInvalid
if the command name is
not between 1 and 32 characters.