Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ahtung! How to make some readline function like in c# for to entering data from the keyboard #395

Open
KostyaDuda opened this issue Feb 14, 2023 · 0 comments

Comments

@KostyaDuda
Copy link

KostyaDuda commented Feb 14, 2023

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);
}

@KostyaDuda KostyaDuda changed the title How to make some readline function like in c# for to entering data from the keyboard Ahtung! How to make some readline function like in c# for to entering data from the keyboard Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant