From 35867c19e6942e82ac6b2bcd93f61853b0b41666 Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:28:09 +0400 Subject: [PATCH] feat: Update invite types (#1365) --- deno/gateway/v10.ts | 4 ++++ deno/gateway/v9.ts | 4 ++++ deno/payloads/v10/invite.ts | 7 +++---- deno/payloads/v9/invite.ts | 7 +++---- gateway/v10.ts | 4 ++++ gateway/v9.ts | 4 ++++ payloads/v10/invite.ts | 7 +++---- payloads/v9/invite.ts | 7 +++---- 8 files changed, 28 insertions(+), 16 deletions(-) diff --git a/deno/gateway/v10.ts b/deno/gateway/v10.ts index 3aeea0a9..f2ca4488 100644 --- a/deno/gateway/v10.ts +++ b/deno/gateway/v10.ts @@ -1560,6 +1560,10 @@ export interface GatewayInviteCreateDispatchData { * How many times the invite has been used (always will be `0`) */ uses: 0; + /** + * The expiration date of this invite. + */ + expires_at: string | null; } /** diff --git a/deno/gateway/v9.ts b/deno/gateway/v9.ts index 55d4da58..e089132e 100644 --- a/deno/gateway/v9.ts +++ b/deno/gateway/v9.ts @@ -1559,6 +1559,10 @@ export interface GatewayInviteCreateDispatchData { * How many times the invite has been used (always will be `0`) */ uses: 0; + /** + * The expiration date of this invite. + */ + expires_at: string | null; } /** diff --git a/deno/payloads/v10/invite.ts b/deno/payloads/v10/invite.ts index 74d640cd..850683a3 100644 --- a/deno/payloads/v10/invite.ts +++ b/deno/payloads/v10/invite.ts @@ -6,7 +6,6 @@ import type { APIApplication } from './application.ts'; import type { APIInviteChannel } from './channel.ts'; import type { APIGuild } from './guild.ts'; import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts'; -import type { APIInviteStageInstance } from './stageInstance.ts'; import type { APIUser } from './user.ts'; export type APIInviteGuild = Pick< @@ -83,10 +82,10 @@ export interface APIInvite { /** * The stage instance data if there is a public stage instance in the stage channel this invite is for * - * @deprecated - * {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479} + * @deprecated This has been removed from the documentation. + * {@link https://github.com/discord/discord-api-docs/pull/7779 | discord-api-docs#7779} */ - stage_instance?: APIInviteStageInstance; + stage_instance?: never; /** * The guild scheduled event data, returned from the `GET /invites/` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id */ diff --git a/deno/payloads/v9/invite.ts b/deno/payloads/v9/invite.ts index 74d640cd..850683a3 100644 --- a/deno/payloads/v9/invite.ts +++ b/deno/payloads/v9/invite.ts @@ -6,7 +6,6 @@ import type { APIApplication } from './application.ts'; import type { APIInviteChannel } from './channel.ts'; import type { APIGuild } from './guild.ts'; import type { APIGuildScheduledEvent } from './guildScheduledEvent.ts'; -import type { APIInviteStageInstance } from './stageInstance.ts'; import type { APIUser } from './user.ts'; export type APIInviteGuild = Pick< @@ -83,10 +82,10 @@ export interface APIInvite { /** * The stage instance data if there is a public stage instance in the stage channel this invite is for * - * @deprecated - * {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479} + * @deprecated This has been removed from the documentation. + * {@link https://github.com/discord/discord-api-docs/pull/7779 | discord-api-docs#7779} */ - stage_instance?: APIInviteStageInstance; + stage_instance?: never; /** * The guild scheduled event data, returned from the `GET /invites/` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id */ diff --git a/gateway/v10.ts b/gateway/v10.ts index 16657e68..6e62c300 100644 --- a/gateway/v10.ts +++ b/gateway/v10.ts @@ -1560,6 +1560,10 @@ export interface GatewayInviteCreateDispatchData { * How many times the invite has been used (always will be `0`) */ uses: 0; + /** + * The expiration date of this invite. + */ + expires_at: string | null; } /** diff --git a/gateway/v9.ts b/gateway/v9.ts index db5b7dd8..173e48a3 100644 --- a/gateway/v9.ts +++ b/gateway/v9.ts @@ -1559,6 +1559,10 @@ export interface GatewayInviteCreateDispatchData { * How many times the invite has been used (always will be `0`) */ uses: 0; + /** + * The expiration date of this invite. + */ + expires_at: string | null; } /** diff --git a/payloads/v10/invite.ts b/payloads/v10/invite.ts index 6812b30b..bc22e595 100644 --- a/payloads/v10/invite.ts +++ b/payloads/v10/invite.ts @@ -6,7 +6,6 @@ import type { APIApplication } from './application'; import type { APIInviteChannel } from './channel'; import type { APIGuild } from './guild'; import type { APIGuildScheduledEvent } from './guildScheduledEvent'; -import type { APIInviteStageInstance } from './stageInstance'; import type { APIUser } from './user'; export type APIInviteGuild = Pick< @@ -83,10 +82,10 @@ export interface APIInvite { /** * The stage instance data if there is a public stage instance in the stage channel this invite is for * - * @deprecated - * {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479} + * @deprecated This has been removed from the documentation. + * {@link https://github.com/discord/discord-api-docs/pull/7779 | discord-api-docs#7779} */ - stage_instance?: APIInviteStageInstance; + stage_instance?: never; /** * The guild scheduled event data, returned from the `GET /invites/` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id */ diff --git a/payloads/v9/invite.ts b/payloads/v9/invite.ts index 6812b30b..bc22e595 100644 --- a/payloads/v9/invite.ts +++ b/payloads/v9/invite.ts @@ -6,7 +6,6 @@ import type { APIApplication } from './application'; import type { APIInviteChannel } from './channel'; import type { APIGuild } from './guild'; import type { APIGuildScheduledEvent } from './guildScheduledEvent'; -import type { APIInviteStageInstance } from './stageInstance'; import type { APIUser } from './user'; export type APIInviteGuild = Pick< @@ -83,10 +82,10 @@ export interface APIInvite { /** * The stage instance data if there is a public stage instance in the stage channel this invite is for * - * @deprecated - * {@link https://github.com/discord/discord-api-docs/pull/4479 | discord-api-docs#4479} + * @deprecated This has been removed from the documentation. + * {@link https://github.com/discord/discord-api-docs/pull/7779 | discord-api-docs#7779} */ - stage_instance?: APIInviteStageInstance; + stage_instance?: never; /** * The guild scheduled event data, returned from the `GET /invites/` endpoint when `guild_scheduled_event_id` is a valid guild scheduled event id */