How to request user's phone number through inline keyboard button? #747
Answered
by
etteryand0
etteryand0
asked this question in
Q&A
-
You can request user's phone number by setting |
Beta Was this translation helpful? Give feedback.
Answered by
etteryand0
Oct 15, 2022
Replies: 1 comment
-
See issue #748. @WaffleLapkin helped me finding the correct type use teloxide::types::{ButtonRequest, KeyboardButton, KeyboardMarkup};
let button = KeyboardButton::new(PHONE_PERMISSION_TEXT).request(ButtonRequest::Contact);
let markup = KeyboardMarkup::new([[button]])
.one_time_keyboard(true)
.resize_keyboard(true);
bot
.send_message(msg.chat.id, REQUIRE_CONTACT_TEXT)
.reply_markup(markup)
.await?; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
etteryand0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See issue #748. @WaffleLapkin helped me finding the correct type
teloxide::types::InlineKeyboardButton
.My code: