diff --git a/index.d.ts b/index.d.ts index 35445f60..1db32c7e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -139,6 +139,7 @@ declare namespace Dysnomia { // Invite type InviteTargetTypes = Constants["InviteTargetTypes"][keyof Constants["InviteTargetTypes"]]; + type InviteTypes = Constants["InviteTypes"][keyof Constants["InviteTypes"]]; // Message type ActionRowComponents = Button | SelectMenu; @@ -2164,6 +2165,11 @@ declare namespace Dysnomia { STREAM: 1; EMBEDDED_APPLICATION: 2; }; + InviteTypes: { + GUILD: 0; + GROUP_DM: 1; + FRIEND: 2; + }; MFALevels: { NONE: 0; ELEVATED: 1; @@ -3285,6 +3291,7 @@ declare namespace Dysnomia { targetType?: InviteTargetTypes; targetUser?: User; temporary: CT extends "withMetadata" ? boolean : null; + type: InviteTypes; uses: CT extends "withMetadata" ? number : null; constructor(data: BaseData, client: Client); delete(reason?: string): Promise; diff --git a/lib/Constants.js b/lib/Constants.js index deaed172..af081202 100644 --- a/lib/Constants.js +++ b/lib/Constants.js @@ -378,6 +378,12 @@ module.exports.InviteTargetTypes = { EMBEDDED_APPLICATION: 2 }; +module.exports.InviteTypes = { + GUILD: 0, + GROUP_DM: 1, + FRIEND: 2 +}; + module.exports.MFALevels = { NONE: 0, ELEVATED: 1 diff --git a/lib/structures/Invite.js b/lib/structures/Invite.js index ccaa971e..c6767bda 100644 --- a/lib/structures/Invite.js +++ b/lib/structures/Invite.js @@ -26,6 +26,11 @@ class Invite extends Base { * @type {String} */ this.code = data.code; + /** + * The invite type + * @type {Number} + */ + this.type = data.type; if(data.guild && client.guilds.has(data.guild.id)) { /** * Info on the invite channel