diff options
| author | Tolmachev Igor <me@igorek.dev> | 2026-04-20 20:56:35 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2026-04-20 20:56:35 +0300 |
| commit | 75e99ca0712a2c09230e5c6f8d093dc526cc717d (patch) | |
| tree | f3f00494364a82b866f093651cb9a08030135c4e /handlers/user/pay_invoice.py | |
| parent | f186fca0f1aa9bbe5eab7613f229df527b2ab774 (diff) | |
| download | vpn_manager_bot-75e99ca0712a2c09230e5c6f8d093dc526cc717d.tar.gz vpn_manager_bot-75e99ca0712a2c09230e5c6f8d093dc526cc717d.zip | |
Add users command
Diffstat (limited to 'handlers/user/pay_invoice.py')
| -rw-r--r-- | handlers/user/pay_invoice.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/handlers/user/pay_invoice.py b/handlers/user/pay_invoice.py index db75f47..d7809cd 100644 --- a/handlers/user/pay_invoice.py +++ b/handlers/user/pay_invoice.py | |||
| @@ -19,7 +19,6 @@ from sqlalchemy import and_, select | |||
| 19 | from sqlalchemy.ext.asyncio import AsyncSession | 19 | from sqlalchemy.ext.asyncio import AsyncSession |
| 20 | 20 | ||
| 21 | from libs.fsm import get_data, set_data | 21 | from libs.fsm import get_data, set_data |
| 22 | from libs.user import mention | ||
| 23 | from models import ( | 22 | from models import ( |
| 24 | Invoice, | 23 | Invoice, |
| 25 | Payment, | 24 | Payment, |
| @@ -27,6 +26,7 @@ from models import ( | |||
| 27 | ReceiptFile, | 26 | ReceiptFile, |
| 28 | ReceiptFileType, | 27 | ReceiptFileType, |
| 29 | User, | 28 | User, |
| 29 | UserCache, | ||
| 30 | UserRole, | 30 | UserRole, |
| 31 | ) | 31 | ) |
| 32 | from models.callback_data import PayInvoiceClb, PaymentStatusClb | 32 | from models.callback_data import PayInvoiceClb, PaymentStatusClb |
| @@ -112,6 +112,7 @@ async def receipt( | |||
| 112 | bot: Bot, | 112 | bot: Bot, |
| 113 | state: FSMContext, | 113 | state: FSMContext, |
| 114 | session: AsyncSession, | 114 | session: AsyncSession, |
| 115 | user_cache: UserCache, | ||
| 115 | ) -> None: | 116 | ) -> None: |
| 116 | if msg.document is not None: | 117 | if msg.document is not None: |
| 117 | receipt_file = ReceiptFile( | 118 | receipt_file = ReceiptFile( |
| @@ -173,7 +174,7 @@ async def receipt( | |||
| 173 | try: | 174 | try: |
| 174 | await bot.send_message( | 175 | await bot.send_message( |
| 175 | admin_id, | 176 | admin_id, |
| 176 | f"Новое подтверждение оплаты:\nПользователь: {mention(msg.chat)}", | 177 | f"Новое подтверждение оплаты:\nПользователь: {user_cache.mention}", |
| 177 | ) | 178 | ) |
| 178 | await receipt_file.send(bot, admin_id, reply_markup=reply_markup) | 179 | await receipt_file.send(bot, admin_id, reply_markup=reply_markup) |
| 179 | except TelegramAPIError as e: | 180 | except TelegramAPIError as e: |
