Update typings for news/store channels

This commit is contained in:
Schuyler Cebulskie
2019-05-11 18:56:14 -04:00
parent 43f2485c9c
commit 8fba786765

16
typings/index.d.ts vendored
View File

@@ -51,7 +51,7 @@ declare module 'discord.js' {
public readonly createdAt: Date;
public readonly createdTimestamp: number;
public id: Snowflake;
public type: 'dm' | 'group' | 'text' | 'voice' | 'category';
public type: 'dm' | 'group' | 'text' | 'voice' | 'category' | 'news' | 'store';
public delete(): Promise<Channel>;
}
@@ -526,7 +526,7 @@ declare module 'discord.js' {
public allowDMs(allow: boolean): Promise<Guild>;
public ban(user: UserResolvable, options?: BanOptions | number | string): Promise<GuildMember | User | string>;
public createChannel(name: string, options?: ChannelData): Promise<CategoryChannel | TextChannel | VoiceChannel>;
public createChannel(name: string, type?: 'category' | 'text' | 'voice', permissionOverwrites?: PermissionOverwrites[] | ChannelCreationOverwrites[], reason?: string): Promise<CategoryChannel | TextChannel | VoiceChannel>;
public createChannel(name: string, type?: 'category' | 'text' | 'voice' | 'news' | 'store', permissionOverwrites?: PermissionOverwrites[] | ChannelCreationOverwrites[], reason?: string): Promise<CategoryChannel | TextChannel | VoiceChannel>;
public createEmoji(attachment: BufferResolvable | Base64Resolvable, name: string, roles?: Collection<Snowflake, Role> | Role[], reason?: string): Promise<Emoji>;
public createRole(data?: RoleData, reason?: string): Promise<Role>;
public delete(): Promise<Guild>;
@@ -892,6 +892,11 @@ declare module 'discord.js' {
public remove(user?: UserResolvable): Promise<MessageReaction>;
}
export class NewsChannel extends TextChannel {
constructor(guild: Guild, data: object);
public rateLimitPerUser: 0;
}
export class OAuth2Application {
constructor(client: Client, data: object);
public bot: object;
@@ -1188,6 +1193,11 @@ declare module 'discord.js' {
public static generate(timestamp?: number | Date): Snowflake;
}
export class StoreChannel extends GuildChannel {
constructor(guild: Guild, data: object);
public nsfw: boolean;
}
export class StreamDispatcher extends VolumeInterface {
constructor(player: AudioPlayer, stream: NodeJS.ReadableStream, streamOptions: StreamOptions);
public destroyed: boolean;
@@ -1630,7 +1640,7 @@ declare module 'discord.js' {
};
type ChannelData = {
type?: 'category' | 'text' | 'voice';
type?: 'category' | 'text' | 'voice' | 'news' | 'store';
name?: string;
position?: number;
topic?: string;