feat: Implement payment notification system and API structure
- Added notifications for successful payments in `api/core/notifications.py`. - Created main API entry point in `api/main.py` with FastAPI integration. - Established routing structure in `api/routes/__init__.py` and `api/routes/pally.py` for handling payment callbacks. - Developed billing handlers in `bot/handlers/billing.py` and `bot/handlers/buy.py` for subscription management. - Introduced state management for user interactions in `bot/states/`. - Created user interface elements in `bot/keyboards/` for navigation and payment processing. - Set up middleware for dependency injection in `bot/middlewares/di.py`. - Added support for user commands and interactions in `bot/handlers/common.py` and `bot/handlers/support.py`. - Implemented logging and error handling throughout the bot's functionality. - Created entry point script for API server in `entrypoints/api.sh`.
This commit is contained in:
27
bot/handlers/support.py
Normal file
27
bot/handlers/support.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import logging
|
||||
|
||||
from aiogram import F, Router
|
||||
from aiogram.filters import Command
|
||||
from aiogram.fsm.context import FSMContext
|
||||
from aiogram.types import CallbackQuery, Message
|
||||
|
||||
from bot.keyboards.client import support_url_kb
|
||||
from bot.texts import SUPPORT_INIT
|
||||
|
||||
router = Router()
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@router.callback_query(F.data == "support")
|
||||
async def support_init(cb: CallbackQuery, state: FSMContext):
|
||||
await state.clear()
|
||||
|
||||
await cb.message.edit_text(text=SUPPORT_INIT, reply_markup=support_url_kb)
|
||||
|
||||
|
||||
@router.message(Command("support"))
|
||||
async def support_init_cmd(msg: Message, state: FSMContext):
|
||||
await state.clear()
|
||||
await msg.delete()
|
||||
|
||||
await msg.answer(text=SUPPORT_INIT, reply_markup=support_url_kb)
|
||||
Reference in New Issue
Block a user