Skip to content

Commit

Permalink
feat(Typings): update typings accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
castdrian committed Jun 10, 2021
1 parent 2c3d954 commit 0de3f3c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions typings/index.d.ts
Expand Up @@ -1950,9 +1950,7 @@ declare module 'discord.js' {
): Promise<RawMessage>;
public fetchMessage(message: Snowflake, cache?: boolean): Promise<RawMessage>;
public send(options: string | APIMessage | (WebhookMessageOptions & { split?: false })): Promise<RawMessage>;
public send(
options: APIMessage | (WebhookMessageOptions & { split: true | SplitOptions }),
): Promise<RawMessage[]>;
public send(options: APIMessage | (WebhookMessageOptions & { split: true | SplitOptions })): Promise<RawMessage[]>;
}

export class WebSocketManager extends EventEmitter {
Expand Down Expand Up @@ -2129,8 +2127,18 @@ declare module 'discord.js' {
name: string,
options: GuildCreateChannelOptions,
): Promise<TextChannel | VoiceChannel | CategoryChannel | NewsChannel | StoreChannel | StageChannel>;
public fetch(id: Snowflake, cache?: boolean, force?: boolean): Promise<TextChannel | VoiceChannel | CategoryChannel | NewsChannel | StoreChannel | StageChannel | null>;
public fetch(id?: Snowflake, cache?: boolean, force?: boolean): Promise<Collection<Snowflake, TextChannel | VoiceChannel | CategoryChannel | NewsChannel | StoreChannel | StageChannel>>;
public fetch(
id: Snowflake,
cache?: boolean,
force?: boolean,
): Promise<TextChannel | VoiceChannel | CategoryChannel | NewsChannel | StoreChannel | StageChannel | null>;
public fetch(
id?: Snowflake,
cache?: boolean,
force?: boolean,
): Promise<
Collection<Snowflake, TextChannel | VoiceChannel | CategoryChannel | NewsChannel | StoreChannel | StageChannel>
>;
}

export class GuildEmojiManager extends BaseGuildEmojiManager {
Expand Down Expand Up @@ -3215,6 +3223,7 @@ declare module 'discord.js' {
attachments?: MessageAttachment[];
content?: string | null;
embed?: MessageEmbed | MessageEmbedOptions | null;
embeds?: (MessageEmbed | MessageEmbedOptions)[] | null;
code?: string | boolean;
files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
flags?: BitFieldResolvable<MessageFlagsString, number>;
Expand Down Expand Up @@ -3727,7 +3736,6 @@ declare module 'discord.js' {
interface WebhookMessageOptions extends Omit<MessageOptions, 'embed' | 'reply'> {
username?: string;
avatarURL?: string;
embeds?: (MessageEmbed | unknown)[];
}

type WebhookTypes = 'Incoming' | 'Channel Follower';
Expand Down

0 comments on commit 0de3f3c

Please sign in to comment.