api-docs!: Remove stage_instance, add expires_at to invites (#4445)

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
Fleny
2025-09-11 17:29:27 +05:30
committed by GitHub
co-authored by Awesome Stickz
parent 9aec72df44
commit d8dbcda383
5 changed files with 2 additions and 12 deletions
-1
View File
@@ -483,7 +483,6 @@ export function createDesiredPropertiesObject<T extends RecursivePartial<Transfo
approximateMemberCount: defaultValue,
approximatePresenceCount: defaultValue,
guildScheduledEvent: defaultValue,
stageInstance: defaultValue,
expiresAt: defaultValue,
flags: defaultValue,
...desiredProperties.invite,
-3
View File
@@ -31,9 +31,6 @@ export function transformInvite(bot: Bot, payload: DiscordInviteCreate | Discord
invite.approximatePresenceCount = payload.approximate_presence_count
if (props.guildScheduledEvent && payload.guild_scheduled_event)
invite.guildScheduledEvent = bot.transformers.scheduledEvent(bot, payload.guild_scheduled_event)
if (props.stageInstance && payload.guild?.id && payload.stage_instance) {
invite.stageInstance = bot.transformers.inviteStageInstance(bot, payload.stage_instance, { guildId: payload.guild.id })
}
if (props.expiresAt && payload.expires_at) {
invite.expiresAt = Date.parse(payload.expires_at)
}
-2
View File
@@ -1071,8 +1071,6 @@ export interface Invite {
uses: number
/** Approximate count of online members (only present when target_user is set) */
approximateMemberCount: number
/** Stage instance data if there is a public Stage instance in the Stage channel this invite is for */
stageInstance?: InviteStageInstance
/** The expiration date of this invite, returned from the GET /invites/code endpoint when with_expiration is true */
expiresAt?: number
/** guild scheduled event data */
+2
View File
@@ -707,6 +707,8 @@ export interface DiscordInviteCreate {
temporary: boolean
/** How many times the invite has been used (always will be 0) */
uses: number
/** The expiration date of this invite. */
expires_at: string
}
/** https://discord.com/developers/docs/events/gateway-events#invite-delete-invite-delete-event-fields */
-6
View File
@@ -30,12 +30,6 @@ export interface DiscordInvite {
approximate_member_count?: number
/** The expiration date of this invite */
expires_at: string | null
/**
* Stage instance data if there is a public Stage instance in the Stage channel this invite is for
*
* @deprecated
*/
stage_instance?: DiscordInviteStageInstance
/** guild scheduled event data */
guild_scheduled_event?: DiscordScheduledEvent
/**