mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
refactor: deprecate invite stage instance (#7437)
This commit is contained in:
@@ -176,6 +176,7 @@ class Invite extends Base {
|
|||||||
/**
|
/**
|
||||||
* The stage instance data if there is a public {@link StageInstance} in the stage channel this invite is for
|
* The stage instance data if there is a public {@link StageInstance} in the stage channel this invite is for
|
||||||
* @type {?InviteStageInstance}
|
* @type {?InviteStageInstance}
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
this.stageInstance = new InviteStageInstance(this.client, data.stage_instance, this.channel.id, this.guild.id);
|
this.stageInstance = new InviteStageInstance(this.client, data.stage_instance, this.channel.id, this.guild.id);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ const Base = require('./Base');
|
|||||||
/**
|
/**
|
||||||
* Represents the data about a public {@link StageInstance} in an {@link Invite}.
|
* Represents the data about a public {@link StageInstance} in an {@link Invite}.
|
||||||
* @extends {Base}
|
* @extends {Base}
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
class InviteStageInstance extends Base {
|
class InviteStageInstance extends Base {
|
||||||
constructor(client, data, channelId, guildId) {
|
constructor(client, data, channelId, guildId) {
|
||||||
|
|||||||
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -1445,10 +1445,12 @@ export class Invite extends Base {
|
|||||||
public toJSON(): unknown;
|
public toJSON(): unknown;
|
||||||
public toString(): string;
|
public toString(): string;
|
||||||
public static INVITES_PATTERN: RegExp;
|
public static INVITES_PATTERN: RegExp;
|
||||||
|
/** @deprecated */
|
||||||
public stageInstance: InviteStageInstance | null;
|
public stageInstance: InviteStageInstance | null;
|
||||||
public guildScheduledEvent: GuildScheduledEvent | null;
|
public guildScheduledEvent: GuildScheduledEvent | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
export class InviteStageInstance extends Base {
|
export class InviteStageInstance extends Base {
|
||||||
private constructor(client: Client, data: RawInviteStageInstance, channelId: Snowflake, guildId: Snowflake);
|
private constructor(client: Client, data: RawInviteStageInstance, channelId: Snowflake, guildId: Snowflake);
|
||||||
public channelId: Snowflake;
|
public channelId: Snowflake;
|
||||||
|
|||||||
Reference in New Issue
Block a user