Answer the question
In order to leave comments, you need to log in
How to find out which groups my telegram bot is added to?
I created a telegram bot, I want to see which groups or channels it was added to. How can i do this?
Answer the question
In order to leave comments, you need to log in
In the bot, register a function to receive data from my_chat_member, parse and write to the database.
// получаем данные от АПИ и преобразуем их в ассоциативный массив
$data = json_decode(file_get_contents('php://input'), true);
$newChat = $data['my_chat_member']['chat']['title']; // в этой переменной будет лежать название канала или группы
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question