Skip to content

Commit 819e04a

Browse files
Alon-LNotSugden
andauthored
fix(Typing): dmChannel bulkDelete (#4115)
Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>
1 parent 46b9e25 commit 819e04a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

typings/index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ declare module 'discord.js' {
555555
public httpStatus: number;
556556
}
557557

558-
export class DMChannel extends TextBasedChannel(Channel) {
558+
export class DMChannel extends TextBasedChannel(Channel, ['bulkDelete']) {
559559
constructor(client: Client, data?: object);
560560
public messages: MessageManager;
561561
public recipient: User;
@@ -1973,7 +1973,10 @@ declare module 'discord.js' {
19731973

19741974
type Constructable<T> = new (...args: any[]) => T;
19751975
function PartialTextBasedChannel<T>(Base?: Constructable<T>): Constructable<T & PartialTextBasedChannelFields>;
1976-
function TextBasedChannel<T>(Base?: Constructable<T>): Constructable<T & TextBasedChannelFields>;
1976+
function TextBasedChannel<T, I extends keyof TextBasedChannelFields = never>(
1977+
Base?: Constructable<T>,
1978+
ignore?: I[],
1979+
): Constructable<T & Omit<TextBasedChannelFields, I>>;
19771980

19781981
interface PartialTextBasedChannelFields {
19791982
lastMessageID: Snowflake | null;

0 commit comments

Comments
 (0)