Ahtung! How to make some readline function like in c# for to entering data from the keyboard #395
Open
Description
I`m doing registration in my telegram bot.
For example i have "check_me" comand. When user enter this comand, user should enter email and password to bot and write this datas to php variables.
[User: enter "/check_me"]
[Bot: "Enter email"]
[User entered email]
[Bot: "Enter pass"]
[User Entered pass]
$bot->command('check_me', function ($message) use ($bot,$TOKEN_DEV) {
$range = 'regisrtation!A2:D';
$users = get_data($range);
$id = $message->getChat()->getId();
$bot_ = new \TelegramBot\Api\BotApi($TOKEN_DEV);
$update_ = new \TelegramBot\Api\Types\Update;
$check_mail = '';
$bot->sendMessage($id, 'Enter email');
$message = $update_->getMessage();
$check_mail = $message->getText();
$bot->sendMessage($id, 'Your email '.$check_mail);
}
Metadata
Assignees
Labels
No labels