nexushub-commands 1.8.1 → 1.8.2
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.
|
@@ -42,9 +42,9 @@ let AdminWithdrawalCommand = AdminWithdrawalCommand_1 = class AdminWithdrawalCom
|
|
|
42
42
|
execute(context, id, decision, template, confirm) {
|
|
43
43
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
var _a, _b;
|
|
45
|
+
const withdrawal = yield GetWithdrawal_command_1.GetWithdrawalCommand.getWithdrawal(id);
|
|
45
46
|
if (!AdminWithdrawalCommand_1.logMessages[id])
|
|
46
47
|
AdminWithdrawalCommand_1.logMessages[id] = context;
|
|
47
|
-
const withdrawal = yield GetWithdrawal_command_1.GetWithdrawalCommand.getWithdrawal(id);
|
|
48
48
|
const withdrawalFormattedID = Math.floor(Math.random() * 500000000 + 500000000)
|
|
49
49
|
.toString(36)
|
|
50
50
|
.toUpperCase();
|
|
@@ -59,7 +59,7 @@ let AdminWithdrawalCommand = AdminWithdrawalCommand_1 = class AdminWithdrawalCom
|
|
|
59
59
|
chat_id: withdrawal.user,
|
|
60
60
|
photo: config.images.withdrawal,
|
|
61
61
|
caption: `<blockquote><b>💸 Одобрена заявка на вывод средств #{{ ${withdrawalFormattedID} }}</b></blockquote>\n\n` +
|
|
62
|
-
`<i>— Сумма: {{ ${withdrawal.amount.
|
|
62
|
+
`<i>— Сумма: {{ ${yield withdrawal.amount.convert({ from: 'RUB', to: config.currency })} }}</i>\n` +
|
|
63
63
|
`<i>— Метод: {{ ${withdrawal.method === 'crypto' ? `Крипто-кошелек ${(_a = withdrawal.coin) === null || _a === void 0 ? void 0 : _a.toUpperCase()}` : withdrawal.method === 'sbp' ? 'Номер телефона' : 'Банковская карта'} }}</i>\n` +
|
|
64
64
|
`<i>— Реквизиты: {{ ${withdrawal.requisites} }}</i>\n` +
|
|
65
65
|
`<i>— Дата: {{ ${withdrawal.date.toLocaleString('ru')} }}</i>\n\n` +
|
|
@@ -112,7 +112,7 @@ let AdminWithdrawalCommand = AdminWithdrawalCommand_1 = class AdminWithdrawalCom
|
|
|
112
112
|
chat_id: withdrawal.user,
|
|
113
113
|
photo: config.images.withdrawal,
|
|
114
114
|
caption: `<blockquote><b>❌ Отклонена заявка на вывод средств</b></blockquote>\n\n` +
|
|
115
|
-
`<i>— Сумма: {{ ${withdrawal.amount.
|
|
115
|
+
`<i>— Сумма: {{ ${yield withdrawal.amount.convert({ from: 'RUB', to: config.currency })} }}</i>\n` +
|
|
116
116
|
`<i>— Метод: {{ ${withdrawal.method === 'crypto' ? `Крипто-кошелек ${(_b = withdrawal.coin) === null || _b === void 0 ? void 0 : _b.toUpperCase()}` : withdrawal.method === 'sbp' ? 'Номер телефона' : 'Банковская карта'} }}</i>\n` +
|
|
117
117
|
`<i>— Реквизиты: {{ ${withdrawal.requisites} }}</i>\n` +
|
|
118
118
|
(template === null ? `\n<b>ℹ️ Обратитесь в <a href="https://t.me/${config.support.username}">тех. поддержку</a> для уточнения проблемы.</b>` : ''),
|
package/package.json
CHANGED
|
@@ -44,9 +44,9 @@ export class AdminWithdrawalCommand extends Command {
|
|
|
44
44
|
@CommandArgument('template?') template: number,
|
|
45
45
|
@CommandArgument('confirm?') confirm: boolean
|
|
46
46
|
) {
|
|
47
|
+
const withdrawal = await GetWithdrawalCommand.getWithdrawal(id);
|
|
47
48
|
if (!AdminWithdrawalCommand.logMessages[id as any]) AdminWithdrawalCommand.logMessages[id as any] = context;
|
|
48
49
|
|
|
49
|
-
const withdrawal = await GetWithdrawalCommand.getWithdrawal(id);
|
|
50
50
|
const withdrawalFormattedID = Math.floor(Math.random() * 500_000_000 + 500_000_000)
|
|
51
51
|
.toString(36)
|
|
52
52
|
.toUpperCase();
|
|
@@ -66,7 +66,7 @@ export class AdminWithdrawalCommand extends Command {
|
|
|
66
66
|
caption:
|
|
67
67
|
`<blockquote><b>💸 Одобрена заявка на вывод средств #{{ ${withdrawalFormattedID} }}</b></blockquote>\n\n` +
|
|
68
68
|
|
|
69
|
-
`<i>— Сумма: {{ ${withdrawal.amount.
|
|
69
|
+
`<i>— Сумма: {{ ${await withdrawal.amount.convert({ from: 'RUB', to: config.currency })} }}</i>\n` +
|
|
70
70
|
`<i>— Метод: {{ ${withdrawal.method === 'crypto' ? `Крипто-кошелек ${withdrawal.coin?.toUpperCase()}` : withdrawal.method === 'sbp' ? 'Номер телефона' : 'Банковская карта'} }}</i>\n` +
|
|
71
71
|
`<i>— Реквизиты: {{ ${withdrawal.requisites} }}</i>\n` +
|
|
72
72
|
`<i>— Дата: {{ ${withdrawal.date.toLocaleString('ru')} }}</i>\n\n` +
|
|
@@ -132,7 +132,7 @@ export class AdminWithdrawalCommand extends Command {
|
|
|
132
132
|
caption:
|
|
133
133
|
`<blockquote><b>❌ Отклонена заявка на вывод средств</b></blockquote>\n\n` +
|
|
134
134
|
|
|
135
|
-
`<i>— Сумма: {{ ${withdrawal.amount.
|
|
135
|
+
`<i>— Сумма: {{ ${await withdrawal.amount.convert({ from: 'RUB', to: config.currency })} }}</i>\n` +
|
|
136
136
|
`<i>— Метод: {{ ${withdrawal.method === 'crypto' ? `Крипто-кошелек ${withdrawal.coin?.toUpperCase()}` : withdrawal.method === 'sbp' ? 'Номер телефона' : 'Банковская карта'} }}</i>\n` +
|
|
137
137
|
`<i>— Реквизиты: {{ ${withdrawal.requisites} }}</i>\n` +
|
|
138
138
|
|