pub struct CreateGlobalMessageCommand<'a> { /* private fields */ }
Expand description
Create a new message 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> CreateGlobalMessageCommand<'a>
impl<'a> CreateGlobalMessageCommand<'a>
sourcepub fn default_member_permissions(self, default: Permissions) -> Self
pub fn default_member_permissions(self, default: Permissions) -> Self
Default permissions required for a member to run the command.
Defaults to None
.
sourcepub fn dm_permission(self, dm_permission: bool) -> Self
pub 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>,
) -> Self
pub fn name_localizations( self, localizations: &'a HashMap<String, String>, ) -> Self
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 CreateGlobalMessageCommand<'_>
impl IntoFuture for CreateGlobalMessageCommand<'_>
source§type Output = Result<Response<Command>, Error>
type Output = Result<Response<Command>, Error>
The output that the future will produce on completion.
source§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
source§impl TryIntoRequest for CreateGlobalMessageCommand<'_>
impl TryIntoRequest for CreateGlobalMessageCommand<'_>
Auto Trait Implementations§
impl<'a> Freeze for CreateGlobalMessageCommand<'a>
impl<'a> !RefUnwindSafe for CreateGlobalMessageCommand<'a>
impl<'a> Send for CreateGlobalMessageCommand<'a>
impl<'a> Sync for CreateGlobalMessageCommand<'a>
impl<'a> Unpin for CreateGlobalMessageCommand<'a>
impl<'a> !UnwindSafe for CreateGlobalMessageCommand<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more