Skip to content
This repository has been archived by the owner on Jun 2, 2019. It is now read-only.

how to get new_chat_member when a user joined to telegram group in telegram bot? #458

Open
ali9776 opened this issue Apr 23, 2019 · 0 comments

Comments

@ali9776
Copy link

ali9776 commented Apr 23, 2019

I'm trying to send a message to user, who joined to a group, with my telegram bot. I add bot to the group and bot is admin in group. and I set the Group Privacy off. I get user with new_chat_member when user joined to group, but the message send to user infinitely. And the update which is for when a member join to group is pending. how I should answer the incoming update when a user join to telegram group?

if(isset($arrayMessage['message'])) {
if (isset($arrayMessage['message']['new_chat_member'])) {
$text= "hello";
$url= "https://api.telegram.org/bot".$token."/sendMessage?chat_id=".$chat_id."&text=".$text;
file_get_contents($url);
}
}
I'm using laravel .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant