Skip to main content

Application

Struct Application 

Source
#[non_exhaustive]
pub struct Application {
Show 33 fields pub id: ApplicationId, pub name: CompactString, pub icon: Option<ImageHash>, pub description: CompactString, pub rpc_origins: Vec<CompactString>, pub bot_public: bool, pub bot_require_code_grant: bool, pub bot: Option<Box<User>>, pub terms_of_service_url: Option<CompactString>, pub privacy_policy_url: Option<CompactString>, pub owner: Option<Box<User>>, pub verify_key: CompactString, pub team: Option<Box<Team>>, pub guild_id: Option<GuildId>, pub guild: Option<Box<PartialGuild>>, pub primary_sku_id: Option<SkuId>, pub slug: Option<CompactString>, pub cover_image: Option<ImageHash>, pub flags: Option<ApplicationFlags>, pub flags_new: Option<ApplicationFlags>, pub approximate_guild_count: Option<u32>, pub approximate_user_install_count: Option<u32>, pub approximate_user_authorization_count: Option<u32>, pub redirect_uris: Vec<CompactString>, pub interactions_endpoint_url: Option<CompactString>, pub role_connections_verification_url: Option<CompactString>, pub event_webhooks_url: Option<CompactString>, pub event_webhooks_status: Option<EventWebhookStatus>, pub event_webhooks_types: Vec<WebhookEventType>, pub tags: Vec<CompactString>, pub install_params: Option<InstallParams>, pub integration_types_config: Option<IntegrationTypesConfig>, pub custom_install_url: Option<CompactString>,
}
Expand description

An application.

discord.js counterpart: ClientApplication / Application.

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.
§id: ApplicationId

The application’s ID.

§name: CompactString

The application’s name.

§icon: Option<ImageHash>

The icon hash.

§description: CompactString

The application’s description.

§rpc_origins: Vec<CompactString>

RPC origin URLs, if RPC is enabled.

§bot_public: bool

Whether anyone (not only the owner) can add the bot to guilds.

§bot_require_code_grant: bool

Whether the bot only joins after the full OAuth2 code grant flow.

§bot: Option<Box<User>>

The application’s bot user.

§terms_of_service_url: Option<CompactString>

The URL of the terms of service.

§privacy_policy_url: Option<CompactString>

The URL of the privacy policy.

§owner: Option<Box<User>>

The application’s owner (for team-owned apps, a team pseudo-user).

§verify_key: CompactString

The hex-encoded public key used to verify interaction requests.

§team: Option<Box<Team>>

The team that owns the application.

§guild_id: Option<GuildId>

The guild associated with the application (e.g. its support server).

§guild: Option<Box<PartialGuild>>

The associated guild.

§primary_sku_id: Option<SkuId>

For games sold on Discord, the “Game SKU”.

§slug: Option<CompactString>

For games sold on Discord, the URL slug of the store page.

§cover_image: Option<ImageHash>

The default rich presence invite cover image hash.

§flags: Option<ApplicationFlags>

The application’s public flags (legacy integer field).

§flags_new: Option<ApplicationFlags>

The application’s public flags, sent as a decimal string.

§approximate_guild_count: Option<u32>

The approximate number of guilds the app is in.

§approximate_user_install_count: Option<u32>

The approximate number of users who installed the app.

§approximate_user_authorization_count: Option<u32>

The approximate number of users with an OAuth2 authorization for the app.

§redirect_uris: Vec<CompactString>

The OAuth2 redirect URIs.

§interactions_endpoint_url: Option<CompactString>§role_connections_verification_url: Option<CompactString>

The role connection (linked roles) verification URL.

§event_webhooks_url: Option<CompactString>

The URL that receives webhook events.

§event_webhooks_status: Option<EventWebhookStatus>

Whether webhook events are enabled.

§event_webhooks_types: Vec<WebhookEventType>

The webhook events the app subscribes to.

§tags: Vec<CompactString>

Up to 5 tags describing the app.

§install_params: Option<InstallParams>

The settings of the app’s default in-app authorization link.

§integration_types_config: Option<IntegrationTypesConfig>

The default scopes and permissions per installation context.

§custom_install_url: Option<CompactString>

The custom authorization URL, if set.

Trait Implementations§

Source§

impl Clone for Application

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Application

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Application

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Application

Source§

impl PartialEq for Application

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Application

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Application

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.