mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
api-docs!: Remove stage_instance, add expires_at to invites (#4445)
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user