Integrations¶
discord_http.integrations module¶
- class discord_http.integrations.Integration(*, state, data, guild) None ¶
Bases:
PartialIntegration
Represents a guild integration.
- Parameters:
state (DiscordAPI)
data (dict)
guild (PartialGuild | Guild)
- guild¶
The guild associated with this integration.
- Type:
- role_id¶
ID of the role that the integration uses for “subscribers”. TThis is not applicable to bot integrations.
- Type:
int | None
- enable_emoticons¶
Whether emoticons should be synced for this integration (twitch only currently) This is not applicable to bot integrations.
- Type:
- expire_behavior¶
The behavior of expiring subscribers. This is not applicable to bot integrations.
- Type:
ExpireBehaviour | None
- expire_grace_period¶
The grace period before expiring subscribers. This is not applicable to bot integrations.
- Type:
int | None
- synced_at¶
The time the integration was last synced. This is not applicable to bot integrations.
- Type:
datetime | None
- subscriber_count¶
The number of subscribers for the integration. This is not applicable to bot integrations.
- Type:
- 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.
- class discord_http.integrations.IntegrationAccount(*, state, data) None ¶
Bases:
object
Represents an account associated with an integration.
- Parameters:
state (DiscordAPI)
data (dict)
- class discord_http.integrations.IntegrationApplication(*, state, data) None ¶
Bases:
PartialBase
Represents a bot/OAuth2 application for integrations.
- Parameters:
state (DiscordAPI)
data (dict)
- 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:
state (DiscordAPI)
id (int)
guild_id (int)
application_id (int | None)
- 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:
- property guild: PartialGuild | Guild¶
The guild associated with this integration.
- Type:
PartialGuild
|Guild