StageInstance
A live stage in a stage channel. Discord keys the fetch/edit/delete routes by channel, while the payload carries its own instance id. The structure keeps both around so callers can work from either side without digging through raw payloads. https://docs.discord.com/developers/resources/stage-instance#stage-instance-object
Signature
export interface StageInstance extends DiscordBase, ObjectToLower<APIStageInstance>Private types
StageInstanceChannelResultTypeAlias
type StageInstanceChannelResult = Awaited<ReturnType<UsingClient['channels']['fetch']>>;Properties
10Methods
5Properties
privacyLevel: StageInstancePrivacyLevel;isGuildOnlyGetterget isGuildOnly(): boolean;Short check for the only usable privacy level Discord documents right now.
id: string;createdTimestampGetterget createdTimestamp(): number;Create a timestamp for the current object.
createdAtGetterget createdAt(): Date;createdAt gets the creation Date instace of the current object.
readonly client: UsingClient;guildId: string;channelId: string;topic: string;guildScheduledEventId?: string | undefined;Methods
channel(mode?: 'rest' | 'flow'): Promise<StageInstanceChannelResult>;channel(mode: 'cache'): ReturnCache<StageInstanceChannelResult | undefined>;The stage channel this instance is live in.
guild(mode?: 'rest' | 'flow'): Promise<GuildStructure<'cached' | 'api'>>;guild(mode: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;The guild that owns the stage channel.
fetch(force?: boolean): Promise<StageInstanceStructure>;Refetches this stage instance from Discord.
Parameters
force- Skip the cache and hit Discord directly.
edit(body: RESTPatchAPIStageInstanceJSONBody, reason?: string): Promise<StageInstanceStructure>;Edits the topic or privacy level of this stage instance.
Parameters
body- The fields to update.
reason- The audit-log reason.
delete(reason?: string): Promise<void>;Deletes this stage instance, ending the live stage.
Parameters
reason- The audit-log reason.