mirror of
https://github.com/danbulant/discord.js
synced 2026-06-10 02:02:40 +00:00
Update typings for news/store channels
This commit is contained in:
parent
43f2485c9c
commit
8fba786765
1 changed files with 13 additions and 3 deletions
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 createdAt: Date;
|
||||||
public readonly createdTimestamp: number;
|
public readonly createdTimestamp: number;
|
||||||
public id: Snowflake;
|
public id: Snowflake;
|
||||||
public type: 'dm' | 'group' | 'text' | 'voice' | 'category';
|
public type: 'dm' | 'group' | 'text' | 'voice' | 'category' | 'news' | 'store';
|
||||||
public delete(): Promise<Channel>;
|
public delete(): Promise<Channel>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -526,7 +526,7 @@ declare module 'discord.js' {
|
||||||
public allowDMs(allow: boolean): Promise<Guild>;
|
public allowDMs(allow: boolean): Promise<Guild>;
|
||||||
public ban(user: UserResolvable, options?: BanOptions | number | string): Promise<GuildMember | User | string>;
|
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, 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 createEmoji(attachment: BufferResolvable | Base64Resolvable, name: string, roles?: Collection<Snowflake, Role> | Role[], reason?: string): Promise<Emoji>;
|
||||||
public createRole(data?: RoleData, reason?: string): Promise<Role>;
|
public createRole(data?: RoleData, reason?: string): Promise<Role>;
|
||||||
public delete(): Promise<Guild>;
|
public delete(): Promise<Guild>;
|
||||||
|
|
@ -892,6 +892,11 @@ declare module 'discord.js' {
|
||||||
public remove(user?: UserResolvable): Promise<MessageReaction>;
|
public remove(user?: UserResolvable): Promise<MessageReaction>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class NewsChannel extends TextChannel {
|
||||||
|
constructor(guild: Guild, data: object);
|
||||||
|
public rateLimitPerUser: 0;
|
||||||
|
}
|
||||||
|
|
||||||
export class OAuth2Application {
|
export class OAuth2Application {
|
||||||
constructor(client: Client, data: object);
|
constructor(client: Client, data: object);
|
||||||
public bot: object;
|
public bot: object;
|
||||||
|
|
@ -1188,6 +1193,11 @@ declare module 'discord.js' {
|
||||||
public static generate(timestamp?: number | Date): Snowflake;
|
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 {
|
export class StreamDispatcher extends VolumeInterface {
|
||||||
constructor(player: AudioPlayer, stream: NodeJS.ReadableStream, streamOptions: StreamOptions);
|
constructor(player: AudioPlayer, stream: NodeJS.ReadableStream, streamOptions: StreamOptions);
|
||||||
public destroyed: boolean;
|
public destroyed: boolean;
|
||||||
|
|
@ -1630,7 +1640,7 @@ declare module 'discord.js' {
|
||||||
};
|
};
|
||||||
|
|
||||||
type ChannelData = {
|
type ChannelData = {
|
||||||
type?: 'category' | 'text' | 'voice';
|
type?: 'category' | 'text' | 'voice' | 'news' | 'store';
|
||||||
name?: string;
|
name?: string;
|
||||||
position?: number;
|
position?: number;
|
||||||
topic?: string;
|
topic?: string;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue