0

I have to ask user for his phone number, so I made a custom ReplyKeyboardMarkup with digits to make it easier for user to reply. But whenever user presses a digit, it automatically sends a message containing this digit. How to disable this feature (or are there other ways like call system keyboard with digits already)? I have this code:

keyboard = [['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9'], ['+', '0', ' ']]
update.message.reply_text(
    'Enter your phone:',
    reply_markup=ReplyKeyboardMarkup(keyboard=keyboard)
)

P.S. I am already using request_contact as one of the possibilities.

UPD: I haven't found any bots that implement that, so it can be impossible.

SenchoPens
  • 17
  • 1
  • 7

1 Answers1

1

Use inline keyboards buttons, or ask the phone number of user by setting request_contact field on "true" in Keyboard Button object.

MarcoBuster
  • 1,145
  • 1
  • 13
  • 21
  • To use InlineKeyboardMarkup is a solution, but I think the idea of inline keyboards is a bit different. Anyway, thank you. – SenchoPens May 20 '17 at 19:01