mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Update typings for news/store channels
This commit is contained in:
16
typings/index.d.ts
vendored
16
typings/index.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user