-
Notifications
You must be signed in to change notification settings - Fork 675
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
Making requests when getting updates #28
Comments
Hi, Can you tell me a real world use case for this? Also, Are you aware that, you won't get any results when you make such a request? You could simply use the |
yes. for example for reply a command that received from user. when a user send a command to robot, server received it in 1 connection. |
Here's how that would work (If you're on Laravel): Route::post('/webhook', function () {
$update = Telegram::getWebhookUpdates();
$chat_id = $update->getMessage()->getChat()->getId();
Telegram::sendChatAction($chat_id, 'typing');
$method = 'sendMessage';
$text = 'This is a demo...!';
return response()->json(compact('method', 'chat_id', 'text'));
}); I'll think of a way to implement this in the project itself. But in the mean time, You can use the above. |
@9px - Hi! Could you tell why you think the send on reply is so useful? Apart from reducing a connection, it provides no information on wither your message was sent correctly etc. That seems like a much bigger disadvantage than the benefit you get back!? I'd love to know what you plan to use this for as I can't think of anything and I'm interested to make sure I'm not missing out! |
@9px Any more info? |
hi. telegram recently add an ability to perform a request to the telegram Bot API while sending an answer to the webhook.
can you do a simple implement of this feature in your bot?
The text was updated successfully, but these errors were encountered: