#[non_exhaustive]pub struct EditCurrentApplication {Show 13 fields
pub custom_install_url: Option<CompactString>,
pub description: Option<CompactString>,
pub role_connections_verification_url: Option<CompactString>,
pub install_params: Option<InstallParams>,
pub integration_types_config: Option<IntegrationTypesConfig>,
pub flags: Option<ApplicationFlags>,
pub icon: Patch<ImageData>,
pub cover_image: Patch<ImageData>,
pub interactions_endpoint_url: Option<CompactString>,
pub tags: Option<Vec<CompactString>>,
pub event_webhooks_url: Option<CompactString>,
pub event_webhooks_status: Option<EventWebhookStatus>,
pub event_webhooks_types: Option<Vec<WebhookEventType>>,
}Expand description
The body of Edit Current Application.
Every field is optional; only the fields that are set change.
discord.js counterpart: the argument of ClientApplication#edit.
§Examples
use djs_model::{
application::InstallParams,
oauth2::Scope,
permissions::Permissions,
rest::EditCurrentApplication,
};
let mut body = EditCurrentApplication::default();
body.description = Some("A bot written in Rust".into());
body.install_params = Some(InstallParams::new(
[Scope::Bot, Scope::ApplicationsCommands],
Permissions::SEND_MESSAGES,
));
assert_eq!(
serde_json::to_string(&body)?,
r#"{"description":"A bot written in Rust","install_params":{"scopes":["bot","applications.commands"],"permissions":"2048"}}"#
);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.custom_install_url: Option<CompactString>The custom authorization URL, used when the app’s install link is a custom URL.
description: Option<CompactString>The description.
role_connections_verification_url: Option<CompactString>The URL that users are sent to to verify their linked roles.
install_params: Option<InstallParams>The settings of the in-app authorization link, used when the install link is the one Discord provides.
integration_types_config: Option<IntegrationTypesConfig>The default scopes and permissions of each installation context.
flags: Option<ApplicationFlags>The public flags. Only GATEWAY_PRESENCE_LIMITED, GATEWAY_GUILD_MEMBERS_LIMITED and
GATEWAY_MESSAGE_CONTENT_LIMITED can be changed.
icon: Patch<ImageData>The new icon; Patch::Clear removes it.
cover_image: Patch<ImageData>The new default rich presence invite cover image; Patch::Clear removes it.
interactions_endpoint_url: Option<CompactString>The URL that receives interactions over HTTP instead of the gateway. Discord checks that it answers its validation requests.
Tags describing the app (up to 5, 20 characters each).
event_webhooks_url: Option<CompactString>The URL that receives webhook events.
event_webhooks_status: Option<EventWebhookStatus>§event_webhooks_types: Option<Vec<WebhookEventType>>The webhook events to receive.