mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types(Integration): Add IntegrationType values (#6815)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
4
typings/index.d.ts
vendored
4
typings/index.d.ts
vendored
@@ -1053,7 +1053,7 @@ export class Integration extends Base {
|
||||
public readonly roles: Collection<Snowflake, Role>;
|
||||
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<T extends Interaction> extends CollectorOptions<[T]> {
|
||||
channel?: TextBasedChannels;
|
||||
componentType?: MessageComponentType | MessageComponentTypes;
|
||||
|
||||
Reference in New Issue
Block a user