Skip to content

GuildIntegrationManager

GuildIntegrationManager ⇐ Base

Represents a manager for guild integrations.

Kind: global class
Extends: Base

new GuildIntegrationManager(guildId, client)

Constructs a new instance of the class.

ParamTypeDescription
guildIdstringThe ID of the guild.
clientClientThe client instance.

guildIntegrationManager.cache ⇒

Getter method for the cache property.

Kind: instance property of GuildIntegrationManager
Returns: The Collection object representing the cache.

guildIntegrationManager._add(integrations, [guildId], [options]) ⇒ Integration | null

Adds an integration to the guild.

Kind: instance method of GuildIntegrationManager
Returns: Integration | null - - The added integration or null if integrations is falsy.

ParamTypeDefaultDescription
integrationsstring | IntegrationThe integration ID or the integration object.
[guildId]string”this.guildId”The ID of the guild to add the integration to.
[options]object{cache: true, force: false}Additional options for adding the integration.
[options.cache]booleantrueWhether to cache the integration.
[options.force]booleanfalseWhether to force adding the integration even if it is already cached.

guildIntegrationManager.fetch([options], [guild]) ⇒ Promise.<Cache>

Fetches the integrations for a guild.

Kind: instance method of GuildIntegrationManager
Returns: Promise.<Cache> - - A promise that resolves to a cache object containing the fetched integrations.

ParamTypeDefaultDescription
[options]ObjectOptional parameters for the fetch request.
[options.cache]booleanWhether to cache the fetched data.
[options.force]booleanWhether to force the fetch request even if the data is already cached.
[guild]string | Guild”this.guildId”The guild to fetch integrations for. Defaults to the current guild.

guildIntegrationManager.delete(options, reason) ⇒ Promise

Deletes an integration from a guild.

Kind: instance method of GuildIntegrationManager
Returns: Promise - A promise that resolves when the integration is deleted and the deleted integration is added to the list of deleted integrations.

ParamTypeDescription
optionsObjectThe options for deleting the integration.
options.guildstringThe ID of the guild where the integration is located.
options.integrationstringThe ID of the integration to delete.
reasonstringThe reason for deleting the integration.