telegram-bot-api-nodejs 1.0.5 → 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 +2 -2
- package/index.js +3 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -618,8 +618,8 @@ export declare function parseCallbackQuery(v?: CallbackQuery): CallbackQuery | u
|
|
|
618
618
|
export declare function parseResponse<T>(response: Response): Promise<T>;
|
|
619
619
|
export declare class TelegramError extends Error {
|
|
620
620
|
status: number;
|
|
621
|
-
|
|
622
|
-
constructor(message: string, 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
|
@@ -468,11 +468,11 @@ export function parseResponse(response) {
|
|
|
468
468
|
}
|
|
469
469
|
export class TelegramError extends Error {
|
|
470
470
|
status;
|
|
471
|
-
|
|
472
|
-
constructor(message, status,
|
|
471
|
+
data;
|
|
472
|
+
constructor(message, status, data = {}) {
|
|
473
473
|
super(message);
|
|
474
474
|
this.status = status;
|
|
475
|
-
this.
|
|
475
|
+
this.data = data;
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
/**
|