79441174

Date: 2025-02-15 08:27:36
Score: 3.5
Natty:
Report link

if i'm understading this correctly. i think when the user asked and he enters a nick name, it fails to be caught by the habdler below(i.e @dp.message(Form.set_nickname_requester)) so inorder to do that before asking "✅ Friend added! Now, please provide their nickname." , set the state there for the next message that will come. '''

@dp.message(Form.add_friend) async def process_friend_request(message: Message, state: FSMContext): # Bot asks for a nickname after receiving target_id await state.update_data(target_id=message.text) await state.set_state(Form.set_nickname_requester) #you should add this await message.answer("✅ Friend added! Now, please provide their nickname.") '''

now when a nick name is added, it will be caught by the handler below.

Reasons:
  • RegEx Blacklisted phrase (2.5): please provide
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Red Yonathan