Struct twilight_http::request::application::command::create_global_command::CreateGlobalUserCommand
source · pub struct CreateGlobalUserCommand<'a> { /* private fields */ }
Expand description
Create a new user global command.
Creating a command with the same name as an already-existing global command will overwrite the old command. See Discord Docs/Create Global Application Command.
Implementations§
source§impl<'a> CreateGlobalUserCommand<'a>
impl<'a> CreateGlobalUserCommand<'a>
sourcepub const fn default_member_permissions(self, default: Permissions) -> Self
pub const fn default_member_permissions(self, default: Permissions) -> Self
Default permissions required for a member to run the command.
Defaults to None
.
sourcepub const fn dm_permission(self, dm_permission: bool) -> Self
pub const fn dm_permission(self, dm_permission: bool) -> Self
Set whether the command is available in DMs.
Defaults to None
.
sourcepub fn name_localizations(
self,
localizations: &'a HashMap<String, String>
) -> Result<Self, CommandValidationError>
pub fn name_localizations(
self,
localizations: &'a HashMap<String, String>
) -> Result<Self, CommandValidationError>
Set the localization dictionary for the command name.
Defaults to None
.
Errors
Returns an error of type NameLengthInvalid
if the name is invalid.
Trait Implementations§
source§impl IntoFuture for CreateGlobalUserCommand<'_>
impl IntoFuture for CreateGlobalUserCommand<'_>
§type Output = Result<Response<Command>, Error>
type Output = Result<Response<Command>, Error>
The output that the future will produce on completion.
§type IntoFuture = ResponseFuture<Command>
type IntoFuture = ResponseFuture<Command>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more