mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
types: @typedef for StageChannelResolvable (#6568)
This commit is contained in:
@@ -33,9 +33,16 @@ class StageInstanceManager extends CachedManager {
|
||||
* @property {PrivacyLevel|number} [privacyLevel] The privacy level of the stage instance
|
||||
*/
|
||||
|
||||
/**
|
||||
* Data that can be resolved to a Stage Channel object. This can be:
|
||||
* * A StageChannel
|
||||
* * A Snowflake
|
||||
* @typedef {StageChannel|Snowflake} StageChannelResolvable
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new stage instance.
|
||||
* @param {StageChannel|Snowflake} channel The stage channel to associate the created stage instance to
|
||||
* @param {StageChannelResolvable} channel The stage channel to associate the created stage instance to
|
||||
* @param {StageInstanceCreateOptions} options The options to create the stage instance
|
||||
* @returns {Promise<StageInstance>}
|
||||
* @example
|
||||
@@ -68,7 +75,7 @@ class StageInstanceManager extends CachedManager {
|
||||
|
||||
/**
|
||||
* Fetches the stage instance associated with a stage channel, if it exists.
|
||||
* @param {StageChannel|Snowflake} channel The stage channel whose associated stage instance is to be fetched
|
||||
* @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be fetched
|
||||
* @param {BaseFetchOptions} [options] Additional options for this fetch
|
||||
* @returns {Promise<StageInstance>}
|
||||
* @example
|
||||
@@ -99,7 +106,7 @@ class StageInstanceManager extends CachedManager {
|
||||
|
||||
/**
|
||||
* Edits an existing stage instance.
|
||||
* @param {StageChannel|Snowflake} channel The stage channel whose associated stage instance is to be edited
|
||||
* @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be edited
|
||||
* @param {StageInstanceEditOptions} options The options to edit the stage instance
|
||||
* @returns {Promise<StageInstance>}
|
||||
* @example
|
||||
@@ -135,7 +142,7 @@ class StageInstanceManager extends CachedManager {
|
||||
|
||||
/**
|
||||
* Deletes an existing stage instance.
|
||||
* @param {StageChannel|Snowflake} channel The stage channel whose associated stage instance is to be deleted
|
||||
* @param {StageChannelResolvable} channel The stage channel whose associated stage instance is to be deleted
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async delete(channel) {
|
||||
|
||||
10
typings/index.d.ts
vendored
10
typings/index.d.ts
vendored
@@ -2715,10 +2715,10 @@ export class RoleManager extends CachedManager<Snowflake, Role, RoleResolvable>
|
||||
export class StageInstanceManager extends CachedManager<Snowflake, StageInstance, StageInstanceResolvable> {
|
||||
public constructor(guild: Guild, iterable?: Iterable<RawStageInstanceData>);
|
||||
public guild: Guild;
|
||||
public create(channel: StageChannel | Snowflake, options: StageInstanceCreateOptions): Promise<StageInstance>;
|
||||
public fetch(channel: StageChannel | Snowflake, options?: BaseFetchOptions): Promise<StageInstance>;
|
||||
public edit(channel: StageChannel | Snowflake, options: StageInstanceEditOptions): Promise<StageInstance>;
|
||||
public delete(channel: StageChannel | Snowflake): Promise<void>;
|
||||
public create(channel: StageChannelResolvable, options: StageInstanceCreateOptions): Promise<StageInstance>;
|
||||
public fetch(channel: StageChannelResolvable, options?: BaseFetchOptions): Promise<StageInstance>;
|
||||
public edit(channel: StageChannelResolvable, options: StageInstanceEditOptions): Promise<StageInstance>;
|
||||
public delete(channel: StageChannelResolvable): Promise<void>;
|
||||
}
|
||||
|
||||
export class ThreadManager<AllowedThreadType> extends CachedManager<Snowflake, ThreadChannel, ThreadChannelResolvable> {
|
||||
@@ -4644,6 +4644,8 @@ export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlags
|
||||
|
||||
export type SystemMessageType = Exclude<MessageType, 'DEFAULT' | 'REPLY' | 'APPLICATION_COMMAND'>;
|
||||
|
||||
export type StageChannelResolvable = StageChannel | Snowflake;
|
||||
|
||||
export interface StageInstanceEditOptions {
|
||||
topic?: string;
|
||||
privacyLevel?: PrivacyLevel | number;
|
||||
|
||||
Reference in New Issue
Block a user