Integrations

discord_http.integrations module

class discord_http.integrations.IntegrationAccount(*, state, data) None

Bases: object

Represents an account associated with an integration.

Parameters:
name: str

The name of the account.

id: str | int

The ID of the account.

class discord_http.integrations.IntegrationApplication(*, state, data) None

Bases: PartialBase

Represents a bot/OAuth2 application for integrations.

Parameters:
name: str

The name of the application.

description: str

The description of the application.

summary: str

The summary of the application.

is_monetized: bool

Whether the application is monetized.

is_verified: bool

Whether the application is verified.

is_discoverable: bool

Whether the application is discoverable.

property icon: Asset | None

The icon of the application, if available.

property bot: User | None

The bot associated with this application, if available.

property created_at: datetime

The datetime of the snowflake.

id: int

The ID of the snowflake.

class discord_http.integrations.PartialIntegration(*, state, id, guild_id, application_id=None) None

Bases: PartialBase

Represents a partial integration object.

This is mosly used to get the ids of objects if not in cache.

Parameters:
guild_id: int

The guild associated with this integration.

application_id: int | None

The ID of the application associated with this integration.

property guild: PartialGuild | Guild

The guild associated with this integration.

Type:

PartialGuild | Guild

async delete() None

Delete this integration for the guild.

This deletes any associated webhooks and kicks the associated bot if there is one.

This requires the MANAGE_GUILD permission.

Return type:

None

property created_at: datetime

The datetime of the snowflake.

id: int

The ID of the snowflake.

class discord_http.integrations.Integration(*, state, data, guild) None

Bases: PartialIntegration

Represents a guild integration.

Parameters:
name: str

The name of the integration.

type: str

The type of the integration. (e.g. “twitch”, “youtube” or “discord”).

application_id: int | None

The ID of the application associated with this integration.

property created_at: datetime

The datetime of the snowflake.

async delete() None

Delete this integration for the guild.

This deletes any associated webhooks and kicks the associated bot if there is one.

This requires the MANAGE_GUILD permission.

Return type:

None

property guild: PartialGuild | Guild

The guild associated with this integration.

Type:

PartialGuild | Guild

guild_id: int

The guild associated with this integration.

id: int

The ID of the snowflake.

enabled: bool

Whether the integration is enabled.

syncing: bool

Whether the integration is syncing. This is not applicable to bot integrations.

role_id: int | None

ID of the role that the integration uses for “subscribers”. TThis is not applicable to bot integrations.

enable_emoticons: bool

Whether emoticons should be synced for this integration (twitch only currently) This is not applicable to bot integrations.

expire_behavior: ExpireBehaviour | None

The behavior of expiring subscribers. This is not applicable to bot integrations.

expire_grace_period: int | None

The grace period before expiring subscribers. This is not applicable to bot integrations.

synced_at: datetime | None

The time the integration was last synced. This is not applicable to bot integrations.

subscriber_count: int

The number of subscribers for the integration. This is not applicable to bot integrations.

revoked: bool

Whether the integration has been revoked.

scopes: list[str]

The scopes of the application has been granted.

property user: User | None

The user associated with this integration, if available.

property account: IntegrationAccount | dict | None

The account associated with this integration, if available.

property application: IntegrationApplication | None

The bot/OAuth2 application for discord integrations, if available.