mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix issues
This commit is contained in:
parent
b3748710d2
commit
9e014f1122
1 changed files with 2 additions and 2 deletions
|
|
@ -87,12 +87,12 @@ async def process_age(message: types.Message, state: FSMContext):
|
|||
# Configure ReplyKeyboardMarkup
|
||||
markup = types.ReplyKeyboardMarkup(resize_keyboard=True, selective=True)
|
||||
markup.add("Male", "Female")
|
||||
markup.add("Intersex")
|
||||
markup.add("Intersex", "Prefer not to say")
|
||||
|
||||
await message.reply("What is your gender?", reply_markup=markup)
|
||||
|
||||
|
||||
@dp.message_handler(lambda message: message.text not in ["Male", "Female", "Other"], state=Form.gender)
|
||||
@dp.message_handler(lambda message: message.text not in ["Male", "Female", "Intersex", "Prefer not to say"], state=Form.gender)
|
||||
async def process_gender_invalid(message: types.Message):
|
||||
"""
|
||||
In this example gender has to be one of: Male, Female, Other.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue