Add default admin
This commit is contained in:
@@ -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
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user