#[non_exhaustive]pub struct EditApplicationCommand {
pub name: Option<CompactString>,
pub name_localizations: Patch<BTreeMap<Locale, CompactString>>,
pub description: Option<CompactString>,
pub description_localizations: Patch<BTreeMap<Locale, CompactString>>,
pub options: Option<Vec<CommandOption>>,
pub default_member_permissions: Patch<Permissions>,
pub integration_types: Option<Vec<IntegrationType>>,
pub contexts: Option<Vec<InteractionContextType>>,
pub nsfw: Option<bool>,
pub handler: Option<EntryPointHandlerType>,
}Expand description
The body of Edit Global Application Command and Edit Guild Application Command.
Every field is optional; a field that is sent replaces the old value entirely (e.g. all
options). Nullable fields are Patches.
discord.js counterpart: ApplicationCommandManager#edit data.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<CompactString>The name.
name_localizations: Patch<BTreeMap<Locale, CompactString>>The name in other languages.
description: Option<CompactString>The description.
description_localizations: Patch<BTreeMap<Locale, CompactString>>The description in other languages.
options: Option<Vec<CommandOption>>The options (all of them).
default_member_permissions: Patch<Permissions>The permissions a member needs by default; Patch::Clear allows everyone.
integration_types: Option<Vec<IntegrationType>>The installation contexts.
contexts: Option<Vec<InteractionContextType>>The interaction contexts.
nsfw: Option<bool>Whether the command is age-restricted.
handler: Option<EntryPointHandlerType>Who handles a primary entry point command.
Trait Implementations§
Source§impl Clone for EditApplicationCommand
impl Clone for EditApplicationCommand
Source§impl Debug for EditApplicationCommand
impl Debug for EditApplicationCommand
Source§impl Default for EditApplicationCommand
impl Default for EditApplicationCommand
Source§impl PartialEq for EditApplicationCommand
impl PartialEq for EditApplicationCommand
Source§impl Serialize for EditApplicationCommand
impl Serialize for EditApplicationCommand
impl StructuralPartialEq for EditApplicationCommand
Auto Trait Implementations§
impl Forget for EditApplicationCommand
impl Freeze for EditApplicationCommand
impl Move for EditApplicationCommand
impl RefUnwindSafe for EditApplicationCommand
impl Send for EditApplicationCommand
impl Sync for EditApplicationCommand
impl Unpin for EditApplicationCommand
impl UnsafeUnpin for EditApplicationCommand
impl UnwindSafe for EditApplicationCommand
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