nexushub-commands 1.8.0 → 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>` : ''),
|
|
@@ -125,16 +125,16 @@ let AdminWithdrawalCommand = AdminWithdrawalCommand_1 = class AdminWithdrawalCom
|
|
|
125
125
|
reply_markup: { inline_keyboard: [[{ text: '👨💻 Тех. поддержка', url: `https://t.me/${config.support.username}` }]] },
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
context = AdminWithdrawalCommand_1.logMessages[withdrawal.id] || context;
|
|
129
|
-
context.sendFormatted({
|
|
130
|
-
noPhoto: true,
|
|
131
|
-
edit: true,
|
|
132
|
-
}, {
|
|
133
|
-
parse_mode: undefined,
|
|
134
|
-
text: context.text + (decision ? '\n\nЗаявка на вывод средств была успешно обработана ☑️' : '\n\nЗаявка на вывод средств была успешно отклонена ☑️'),
|
|
135
|
-
entities: context.entities,
|
|
136
|
-
});
|
|
137
128
|
}
|
|
129
|
+
context = AdminWithdrawalCommand_1.logMessages[withdrawal.id] || context;
|
|
130
|
+
context.sendFormatted({
|
|
131
|
+
noPhoto: true,
|
|
132
|
+
edit: true,
|
|
133
|
+
}, {
|
|
134
|
+
parse_mode: undefined,
|
|
135
|
+
text: context.text + (decision ? '\n\nЗаявка на вывод средств была успешно обработана ☑️' : '\n\nЗаявка на вывод средств была успешно отклонена ☑️'),
|
|
136
|
+
entities: context.entities,
|
|
137
|
+
});
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
};
|
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
|
|
|
@@ -153,19 +153,19 @@ export class AdminWithdrawalCommand extends Command {
|
|
|
153
153
|
}
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
|
-
|
|
157
|
-
context = AdminWithdrawalCommand.logMessages[withdrawal.id as any] || context;
|
|
158
|
-
context.sendFormatted(
|
|
159
|
-
{
|
|
160
|
-
noPhoto: true,
|
|
161
|
-
edit: true,
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
parse_mode: undefined,
|
|
165
|
-
text: context.text + (decision ? '\n\nЗаявка на вывод средств была успешно обработана ☑️' : '\n\nЗаявка на вывод средств была успешно отклонена ☑️'),
|
|
166
|
-
entities: context.entities,
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
156
|
}
|
|
157
|
+
|
|
158
|
+
context = AdminWithdrawalCommand.logMessages[withdrawal.id as any] || context;
|
|
159
|
+
context.sendFormatted(
|
|
160
|
+
{
|
|
161
|
+
noPhoto: true,
|
|
162
|
+
edit: true,
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
parse_mode: undefined,
|
|
166
|
+
text: context.text + (decision ? '\n\nЗаявка на вывод средств была успешно обработана ☑️' : '\n\nЗаявка на вывод средств была успешно отклонена ☑️'),
|
|
167
|
+
entities: context.entities,
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
170
|
}
|
|
171
171
|
}
|