#[non_exhaustive]pub struct Integration {Show 16 fields
pub id: IntegrationId,
pub name: CompactString,
pub kind: IntegrationType,
pub enabled: bool,
pub syncing: bool,
pub role_id: Option<RoleId>,
pub enable_emoticons: bool,
pub expire_behavior: Option<IntegrationExpireBehavior>,
pub expire_grace_period: Option<u32>,
pub user: Option<Box<User>>,
pub account: IntegrationAccount,
pub synced_at: Option<Timestamp>,
pub subscriber_count: Option<u32>,
pub revoked: bool,
pub application: Option<Box<IntegrationApplication>>,
pub scopes: Vec<Scope>,
}Expand description
An integration in a guild: a bot or app, or a Twitch/YouTube subscription.
Fields marked “not for Discord bots” are absent for discord integrations.
discord.js counterpart: Integration.
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.id: IntegrationIdThe integration’s ID.
name: CompactStringThe integration’s name.
kind: IntegrationTypeThe kind of integration.
enabled: boolWhether the integration is enabled.
syncing: boolWhether the integration is syncing (not for Discord bots).
role_id: Option<RoleId>The role given to subscribers (not for Discord bots).
enable_emoticons: boolWhether emoticons are synced (Twitch only).
expire_behavior: Option<IntegrationExpireBehavior>What happens to expired subscribers (not for Discord bots).
expire_grace_period: Option<u32>The grace period before subscribers expire, in days (not for Discord bots).
user: Option<Box<User>>The user who added the integration.
account: IntegrationAccountThe integration’s account.
synced_at: Option<Timestamp>When the integration last synced (not for Discord bots).
subscriber_count: Option<u32>The number of subscribers (not for Discord bots).
revoked: boolWhether the integration was revoked (not for Discord bots).
application: Option<Box<IntegrationApplication>>The bot or OAuth2 application of a Discord integration.
scopes: Vec<Scope>The scopes the application was authorized for.