StageInstanceManager

export class StageInstanceManager extends CachedManager<Snowflake, StageInstance, StageInstanceResolvable>
export class StageInstanceManager extends CachedManager<Snowflake, StageInstance, StageInstanceResolvable>
Manages API methods for StageInstance objects and holds their cache.
Readonly
cache:Collection<Key, Holds>
The cache of items for this manager.
Inherited from DataManager
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
guild:Guild
The guild this manager belongs to
Readonly
holds:Constructable<Holds>
The data structure belonging to this manager.
Inherited from DataManager
create(channel, options):Promise<StageInstance>
Creates a new stage instance.
Example
// Create a stage instance
guild.stageInstances.create('1234567890123456789', {
topic: 'A very creative topic',
privacyLevel: GuildPrivacyLevel.GuildOnly
})
.then(stageInstance => console.log(stageInstance))
.catch(console.error);
// Create a stage instance
guild.stageInstances.create('1234567890123456789', {
topic: 'A very creative topic',
privacyLevel: GuildPrivacyLevel.GuildOnly
})
.then(stageInstance => console.log(stageInstance))
.catch(console.error);
NameTypeOptionalDescription
channelStageChannelResolvableNoThe stage channel to associate the created stage instance to
optionsStageInstanceCreateOptionsNoThe options to create the stage instance
delete(channel):Promise<void>
Deletes an existing stage instance.
NameTypeOptionalDescription
channelStageChannelResolvableNoThe stage channel whose associated stage instance is to be deleted
edit(channel, options):Promise<StageInstance>
Edits an existing stage instance.
Example
// Edit a stage instance
guild.stageInstances.edit('1234567890123456789', { topic: 'new topic' })
.then(stageInstance => console.log(stageInstance))
.catch(console.error);
// Edit a stage instance
guild.stageInstances.edit('1234567890123456789', { topic: 'new topic' })
.then(stageInstance => console.log(stageInstance))
.catch(console.error);
NameTypeOptionalDescription
channelStageChannelResolvableNoThe stage channel whose associated stage instance is to be edited
optionsStageInstanceEditOptionsNoThe options to edit the stage instance
fetch(channel, options?):Promise<StageInstance>
Fetches the stage instance associated with a stage channel, if it exists.
Example
// Fetch a stage instance
guild.stageInstances.fetch('1234567890123456789')
.then(stageInstance => console.log(stageInstance))
.catch(console.error);
// Fetch a stage instance
guild.stageInstances.fetch('1234567890123456789')
.then(stageInstance => console.log(stageInstance))
.catch(console.error);
NameTypeOptionalDescription
channelStageChannelResolvableNoThe stage channel whose associated stage instance is to be fetched
optionsBaseFetchOptionsYesAdditional options for this fetch
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):Key
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceKey | HoldsNoThe id or instance of something in this Manager
valueOf():Collection<Key, Holds>