Files
malenia/handlers/menus.py
2026-04-05 21:06:43 +07:00

46 lines
1.4 KiB
Python

from aiogram import Router
from aiogram.filters import CommandStart, CommandObject
from aiogram.types import Message
from aiogram.fsm.context import FSMContext
from sqlalchemy.ext.asyncio import AsyncSession
from dto.di import DependenciesDTO
from keyboards.client import main_menu
router = Router()
@router.message(CommandStart(deep_link=True, deep_link_encoded=False))
async def fetch_referal(
msg: Message,
command: CommandObject,
state: FSMContext,
session: AsyncSession,
deps: DependenciesDTO,
):
await state.clear()
data = command.args.split()
if not data:
await standard_start(msg, command, state)
return
referal = data[0]
await deps.user_service.add_user(session, user_id=msg.from_user.id, referal=referal)
await msg.reply(f"hi but....{referal}", reply_markup=main_menu)
@router.message(CommandStart(deep_link=False))
async def standard_start(msg: Message, command: CommandObject, state: FSMContext):
await msg.reply("hii!", reply_markup=main_menu)
# INSANE HOW UNSTABLE THIS FUCKING SYSTEM IS
# EVEN AFTER ROLLING EVERYTHING BACK
# HALF OF MY APPS STILL DONT WORK
# I FUCKING HATE THIS SHIT
# I CANT PACMAN -SYU CUZ IT BREAKS NVIDIA DRIVERS AND MY 240HZ MONITOR
# IS IN FUCKING 3 FPS **CONSTANTLY**
# I CANT MAKE IT UP AND I REALLY CANT TAE IT ANYMORE.
# wrap it up bud. we're gonna reset everything. bye. o7