StageInstanceManager
classe · Source
Manages API methods for StageInstance objects and holds their cache.
Extends: CachedManager
Properties
guild
The guild this manager belongs to Source
cache
The cache of this Manager Source
_cache
The private cache of items for this manager. Source
holds
The data structure belonging to this manager. Source
client
The client that instantiated this Manager Source
Methods
create
Creates a new stage instance. Parameters
| Name | Type | Description |
|---|---|---|
channel | StageChannelResolvable | The stage channel to associate the created stage instance to |
options | StageInstanceCreateOptions | The options to create the stage instance |
Returns: Promise<StageInstance>
// Create a stage instance
guild.stageInstances.create('1234567890123456789', {
topic: 'A very creative topic',
privacyLevel: 'GUILD_ONLY'
})
.then(stageInstance => console.log(stageInstance))
.catch(console.error);fetch
Fetches the stage instance associated with a stage channel, if it exists. Parameters
| Name | Type | Description |
|---|---|---|
channel | StageChannelResolvable | The stage channel whose associated stage instance is to be fetched |
options? | BaseFetchOptions | Additional options for this fetch |
Returns: Promise<StageInstance>
// Fetch a stage instance
guild.stageInstances.fetch('1234567890123456789')
.then(stageInstance => console.log(stageInstance))
.catch(console.error);edit
Edits an existing stage instance. Parameters
| Name | Type | Description |
|---|---|---|
channel | StageChannelResolvable | The stage channel whose associated stage instance is to be edited |
options | StageInstanceEditOptions | The options to edit the stage instance |
Returns: Promise<StageInstance>
// Edit a stage instance
guild.stageInstances.edit('1234567890123456789', { topic: 'new topic' })
.then(stageInstance => console.log(stageInstance))
.catch(console.error);delete
Deletes an existing stage instance. Parameters
| Name | Type | Description |
|---|---|---|
channel | StageChannelResolvable | The stage channel whose associated stage instance is to be deleted |
Returns: Promise<void>Source
resolve
Resolves a data entry to a data Object. Parameters
| Name | Type | Description |
|---|---|---|
idOrInstance | string | Object | The id or instance of something in this Manager |
Returns: Object — An instance from this Manager Source
resolveId
Resolves a data entry to an instance id. Parameters
| Name | Type | Description |
|---|---|---|
idOrInstance | string | Object | The id or instance of something in this Manager |
Returns: SnowflakeSource