Integrations

discord_http.integrations module

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

Bases: PartialIntegration

Represents a guild integration.

Parameters:
id

The ID of the integration.

name

The name of the integration.

guild

The guild associated with this integration.

type

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

enabled

Whether the integration is enabled.

syncing

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

role_id

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

enable_emoticons

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

expire_behavior

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

expire_grace_period

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

synced_at

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

subscriber_count

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

revoked

Whether the integration has been revoked.

scopes

The scopes of the application has been granted.

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.

property user: User | None

The user associated with this integration, if available.

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

Bases: object

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

Bases: PartialBase

Represents a bot/OAuth2 application for integrations.

Parameters:
property bot: User | None

The bot associated with this application, if available.

property icon: Asset | None

The icon of the application, if available.

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:
id

The ID of the integration.

Type:

int

guild_id

The guild associated with this integration.

application_id

The ID of the application associated with this integration.

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