fix: AttributeError in withdrawal admin notification (send_to_admins → send_admin_notification)

This commit is contained in:
Fringg
2026-02-17 05:23:49 +03:00
parent 27309f53d9
commit c75ec0b22a
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -793,7 +793,7 @@ async def confirm_withdrawal_request(callback: types.CallbackQuery, db_user: Use
try:
notification_service = AdminNotificationService(callback.bot)
await notification_service.send_to_admins(admin_text, keyboard=admin_keyboard)
await notification_service.send_admin_notification(admin_text, reply_markup=admin_keyboard)
except Exception as e:
logger.error('Ошибка отправки уведомления админам о заявке на вывод', error=e)
@@ -1215,6 +1215,14 @@ class AdminNotificationService:
"""Public check for whether admin notifications are configured and active."""
return self._is_enabled()
async def send_admin_notification(
self, text: str, reply_markup: types.InlineKeyboardMarkup | None = None
) -> bool:
"""Send a generic notification to admin chat with optional inline keyboard."""
if not self._is_enabled():
return False
return await self._send_message(text, reply_markup=reply_markup)
async def send_webhook_notification(self, text: str) -> bool:
"""Send a generic webhook/infrastructure notification to admin chat.