Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Typings): add missing typings for HttpError -> requestData #5742

Merged
merged 9 commits into from Jun 3, 2021
12 changes: 12 additions & 0 deletions typings/index.d.ts
Expand Up @@ -710,6 +710,7 @@ declare module 'discord.js' {
public method: string;
public path: string;
public httpStatus: number;
public requestData: HTTPErrorData;
}

export class DMChannel extends TextBasedChannel(Channel, ['bulkDelete']) {
Expand Down Expand Up @@ -1050,6 +1051,7 @@ declare module 'discord.js' {
public method: string;
public name: string;
public path: string;
public requestData: HTTPErrorData;
}

export class Integration extends Base {
Expand Down Expand Up @@ -3083,6 +3085,16 @@ declare module 'discord.js' {
cache?: boolean;
}

interface HTTPAttachmentData {
name: string;
casperiv0 marked this conversation as resolved.
Show resolved Hide resolved
file: Buffer;
casperiv0 marked this conversation as resolved.
Show resolved Hide resolved
}

interface HTTPErrorData {
json: any;
casperiv0 marked this conversation as resolved.
Show resolved Hide resolved
files: HTTPAttachmentData[];
}

interface HTTPOptions {
api?: string;
version?: number;
Expand Down