feat(StageChannel): add createStageInstance method & use better naming convention (#5951)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
Shubham Parihar
2021-07-01 14:28:11 +05:30
committed by GitHub
parent 388e05b4af
commit 71fb33a5fe
4 changed files with 26 additions and 18 deletions

8
typings/index.d.ts vendored
View File

@@ -1882,7 +1882,8 @@ declare module 'discord.js' {
export class StageChannel extends BaseGuildVoiceChannel {
public topic: string | null;
public type: 'stage';
public readonly instance: StageInstance | null;
public readonly stageInstance: StageInstance | null;
public createStageInstance(options: StageInstanceCreateOptions): Promise<StageInstance>;
}
export class StageInstance extends Base {
@@ -2643,7 +2644,7 @@ declare module 'discord.js' {
export class StageInstanceManager extends BaseManager<Snowflake, StageInstance, StageInstanceResolvable> {
constructor(guild: Guild, iterable?: Iterable<any>);
public guild: Guild;
public create(options: CreateStageInstanceOptions): Promise<StageInstance>;
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>;
@@ -3226,8 +3227,7 @@ declare module 'discord.js' {
reason?: string;
}
interface CreateStageInstanceOptions {
channel: StageChannel | Snowflake;
interface StageInstanceCreateOptions {
topic: string;
privacyLevel?: PrivacyLevel | number;
}