pub struct CreateGuildUserCommand<'a> { /* private fields */ }Expand description
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.
Implementations§
Source§impl<'a> CreateGuildUserCommand<'a>
impl<'a> CreateGuildUserCommand<'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 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 CreateGuildUserCommand<'_>
impl IntoFuture for CreateGuildUserCommand<'_>
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 CreateGuildUserCommand<'_>
impl TryIntoRequest for CreateGuildUserCommand<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CreateGuildUserCommand<'a>
impl<'a> !UnwindSafe for CreateGuildUserCommand<'a>
impl<'a> Forget for CreateGuildUserCommand<'a>
impl<'a> Freeze for CreateGuildUserCommand<'a>where
PhantomData<fn(ApplicationMarker) -> ApplicationMarker>: Freeze,
NonZero<u64>: Freeze,
InternalBitFlags: Freeze,
&'a str: Freeze,
&'a HashMap<String, String>: Freeze,
PhantomData<fn(GuildMarker) -> GuildMarker>: Freeze,
&'a Client: Freeze,
impl<'a> Move for CreateGuildUserCommand<'a>
impl<'a> Send for CreateGuildUserCommand<'a>
impl<'a> Sync for CreateGuildUserCommand<'a>where
NonZero<u64>: Sync,
InternalBitFlags: Sync,
RawTable<(String, String)>: Sync,
RawVecInner: Sync,
BoxRaw<[Pos]>: Sync,
Bytes: Sync,
Arc<Config>: Sync,
Arc<Resolver<GenericConnector<TokioRuntimeProvider>>>: Sync,
Arc<ClientConfig>: Sync,
Arc<dyn ResolveServerName + Send + Sync>: Sync,
Arc<dyn Executor<Pin<Box<dyn Future<Output = ()> + Send>>> + Send + Sync>: Sync,
Arc<dyn Timer + Send + Sync>: Sync,
Arc<Mutex<PoolInner<PoolClient<Full<Bytes>>, (Scheme, Authority)>>>: Sync,
BoxRaw<str>: Sync,
Arc<Chan<(Message, Option<Box<dyn FnOnce(Option<Bucket>) -> bool + Send>>), Semaphore>>: Sync,
Arc<Atomic<bool>>: Sync,
impl<'a> Unpin for CreateGuildUserCommand<'a>
impl<'a> UnsafeUnpin for CreateGuildUserCommand<'a>where
PhantomData<fn(ApplicationMarker) -> ApplicationMarker>: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
InternalBitFlags: UnsafeUnpin,
&'a str: UnsafeUnpin,
&'a HashMap<String, String>: UnsafeUnpin,
PhantomData<fn(GuildMarker) -> GuildMarker>: UnsafeUnpin,
&'a Client: UnsafeUnpin,
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