Add default admin

This commit is contained in:
Zakhar Izmaylov
2024-11-17 16:01:18 +03:00
parent be0e9d46e9
commit d33fe0040e
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -8,10 +8,10 @@ router = Router()
@router.message(Command("start"))
async def handle_start(message: types.Message, state: FSMContext, admin: bool):
async def handle_start(message: types.Message, state: FSMContext, admin: bool = False):
await start_command(message, admin)
@router.message(Command("menu"))
async def handle_menu(message: types.Message, state: FSMContext, admin: bool):
async def handle_menu(message: types.Message, state: FSMContext, admin: bool = False):
await start_command(message, admin)
+1 -1
View File
@@ -55,7 +55,7 @@ async def send_welcome_message(chat_id: int, trial_status: int, admin: bool):
)
async def start_command(message: Message, admin: bool):
async def start_command(message: Message, admin: bool = False):
logger.info(f"Received start command with text: {message.text}")
if "referral_" in message.text:
referrer_tg_id = int(message.text.split("referral_")[1])