mirror of
https://github.com/BEDOLAGA-DEV/remnawave-bedolaga-telegram-bot.git
synced 2026-02-27 14:51:19 +00:00
- Add pyproject.toml with uv and ruff configuration - Pin Python version to 3.13 via .python-version - Add Makefile commands: lint, format, fix - Apply ruff formatting to entire codebase - Remove unused imports (base64 in yookassa/simple_subscription) - Update .gitignore for new config files
29 lines
878 B
Python
29 lines
878 B
Python
import logging
|
|
|
|
from aiogram import Dispatcher, F, types
|
|
|
|
from app.database.models import User
|
|
from app.keyboards.inline import get_support_keyboard
|
|
from app.localization.texts import get_texts
|
|
from app.services.support_settings_service import SupportSettingsService
|
|
from app.utils.photo_message import edit_or_answer_photo
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
async def show_support_info(callback: types.CallbackQuery, db_user: User):
|
|
get_texts(db_user.language)
|
|
support_info = SupportSettingsService.get_support_info_text(db_user.language)
|
|
await edit_or_answer_photo(
|
|
callback=callback,
|
|
caption=support_info,
|
|
keyboard=get_support_keyboard(db_user.language),
|
|
parse_mode='HTML',
|
|
)
|
|
await callback.answer()
|
|
|
|
|
|
def register_handlers(dp: Dispatcher):
|
|
dp.callback_query.register(show_support_info, F.data == 'menu_support')
|