telegram-bot-api-nodejs 1.0.4 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +3 -3
- package/index.js +5 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -617,9 +617,9 @@ export declare function parsePollOption(v: PollOption): {
|
|
|
617
617
|
export declare function parseCallbackQuery(v?: CallbackQuery): CallbackQuery | undefined;
|
|
618
618
|
export declare function parseResponse<T>(response: Response): Promise<T>;
|
|
619
619
|
export declare class TelegramError extends Error {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
constructor(message: string,
|
|
620
|
+
status: number;
|
|
621
|
+
data: Record<string, any>;
|
|
622
|
+
constructor(message: string, status: number, data?: Record<string, any>);
|
|
623
623
|
}
|
|
624
624
|
/**
|
|
625
625
|
* Helpers
|
package/index.js
CHANGED
|
@@ -467,12 +467,12 @@ export function parseResponse(response) {
|
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
export class TelegramError extends Error {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
constructor(message,
|
|
470
|
+
status;
|
|
471
|
+
data;
|
|
472
|
+
constructor(message, status, data = {}) {
|
|
473
473
|
super(message);
|
|
474
|
-
this.
|
|
475
|
-
this.
|
|
474
|
+
this.status = status;
|
|
475
|
+
this.data = data;
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
/**
|