Reputation: 17
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.
Upvotes: 0
Views: 2267
Reputation: 1233
Use inline keyboards buttons, or ask the phone number of user by setting request_contact
field on "true" in Keyboard Button object.
Upvotes: 1