diff --git a/src/structures/Integration.js b/src/structures/Integration.js index 525f75aab..5773de861 100644 --- a/src/structures/Integration.js +++ b/src/structures/Integration.js @@ -10,6 +10,14 @@ const IntegrationApplication = require('./IntegrationApplication'); * @property {string} name The name of the account */ +/** + * The type of an {@link Integration}. This can be: + * * `twitch` + * * `youtube` + * * `discord` + * @typedef {string} IntegrationType + */ + /** * Represents a guild integration. */ @@ -36,8 +44,8 @@ class Integration extends Base { this.name = data.name; /** - * The integration type (twitch, youtube or discord) - * @type {string} + * The integration type + * @type {IntegrationType} */ this.type = data.type; diff --git a/typings/index.d.ts b/typings/index.d.ts index f72d78d36..8e240cdfb 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1053,7 +1053,7 @@ export class Integration extends Base { public readonly roles: Collection; public syncedAt: number | undefined; public syncing: boolean | undefined; - public type: string; + public type: IntegrationType; public user: User | null; public subscriberCount: number | null; public revoked: boolean | null; @@ -4207,6 +4207,8 @@ export interface IntegrationAccount { name: string; } +export type IntegrationType = 'twitch' | 'youtube' | 'discord'; + export interface InteractionCollectorOptions extends CollectorOptions<[T]> { channel?: TextBasedChannels; componentType?: MessageComponentType | MessageComponentTypes;