nexushub-commands 1.0.2 → 1.0.4

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.
@@ -14,14 +14,14 @@ let CheckPaidOrderCommand = class CheckPaidOrderCommand extends migrated_1.Comma
14
14
  const config = Client_1.Client.config(context);
15
15
  yield config.API.get(`/orders/${orderId}/checkPaid`).catch(() => { });
16
16
  const order = yield config.API.get(`/orders/${orderId}`).then((x) => x.data);
17
- if (!order.data.cheque || ['card', 'qrcode'].includes(order.method))
17
+ if (!order.cheque || ['card', 'qrcode'].includes(order.method))
18
18
  return context.sendFormattedQuestion({
19
19
  photo: config.images.depositCard,
20
20
  header: '<blockquote>🧾 Подтверждение оплаты счета</blockquote>',
21
21
  footer: '<i>Пожалуйста, отправьте чек, подтверждающий оплату счета в следующем сообщении</i>',
22
22
  }, undefined, (msg) => tslib_1.__awaiter(this, void 0, void 0, function* () {
23
23
  var _a, _b;
24
- const url = null;
24
+ let url = null;
25
25
  if ((_a = msg.attachments.photo) === null || _a === void 0 ? void 0 : _a.length) {
26
26
  url = `https://api.telegram.org/file/bot${this.client.params.token}/${(yield this.client.api.getFile({ file_id: msg.attachments.photo.at(-1).file_id })).file_path}`;
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexushub-commands",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "./lib/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -12,7 +12,7 @@ export class CheckPaidOrderCommand extends Command {
12
12
  await config.API.get(`/orders/${orderId}/checkPaid`).catch(() => {});
13
13
  const order = await config.API.get(`/orders/${orderId}`).then((x) => x.data);
14
14
 
15
- if (!order.data.cheque || ['card', 'qrcode'].includes(order.method))
15
+ if (!order.cheque || ['card', 'qrcode'].includes(order.method))
16
16
  return context.sendFormattedQuestion(
17
17
  {
18
18
  photo: config.images.depositCard,
@@ -21,7 +21,7 @@ export class CheckPaidOrderCommand extends Command {
21
21
  },
22
22
  undefined,
23
23
  async (msg) => {
24
- const url: any = null;
24
+ let url: any = null;
25
25
  if (msg.attachments.photo?.length) {
26
26
  url = `https://api.telegram.org/file/bot${this.client.params.token}/${
27
27
  (await this.client.api.getFile({ file_id: msg.attachments.photo.at(-1)!.file_id })).file_path