diff --git a/packages/discord.js/src/structures/Invite.js b/packages/discord.js/src/structures/Invite.js index 19014ff69543..4f597d20063b 100644 --- a/packages/discord.js/src/structures/Invite.js +++ b/packages/discord.js/src/structures/Invite.js @@ -22,6 +22,13 @@ class Invite extends Base { constructor(client, data) { super(client); + + /** + * The type of this invite + * @type {InviteType} + */ + this.type = data.type; + this._patch(data); } diff --git a/packages/discord.js/src/util/APITypes.js b/packages/discord.js/src/util/APITypes.js index 1031c13bee25..7f2b5922f284 100644 --- a/packages/discord.js/src/util/APITypes.js +++ b/packages/discord.js/src/util/APITypes.js @@ -410,6 +410,11 @@ * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InteractionResponseType} */ +/** + * @external InviteType + * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InviteType} + */ + /** * @external InviteTargetType * @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/InviteTargetType} diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index c7ed605ce5d8..d24718b62977 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -180,6 +180,7 @@ import { APIPollAnswer, APISelectMenuDefaultValue, SelectMenuDefaultValueType, + InviteType, } from 'discord-api-types/v10'; import { ChildProcess } from 'node:child_process'; import { EventEmitter } from 'node:events'; @@ -1990,6 +1991,7 @@ export class Invite extends Base { public targetUser: User | null; public targetType: InviteTargetType | null; public temporary: boolean | null; + public type: InviteType; public get url(): string; public uses: number | null; public delete(reason?: string): Promise;