so am making a telegram bot using Telegraf.js in Node and the bot requires the user's phone number and in Telegraf one way of requesting phone number is like this
ctx.reply(
"Phone number is required",
{
...Markup.keyboard([
Markup.button.contactRequest("Send Contact"),
]).resize(),
}
);
and this works perfectly fine, but I don't know how to handle the result of the contact request, I've tried using bot.hears by treating it like a callback button (Markup.button.callback("Send Contact"))
bot.hears("Send Contact",(ctx)=>{
console.log("contact received")
})
but this doesn't work, so I was wondering if there is a special way to handle the response of Markup.button.contactRequest