Answer the question
In order to leave comments, you need to log in
How to distinguish a new user who has joined a group from a bot?
Hello everyone, I'm trying to get a string is_bot
from a new user, I tried a million variations, none of them worked, here is a code snippet:
if (array_key_exists("new_chat_participant", $data['message'])) {
$mes_from = $data['message']['new_chat_participant']['is_bot'];
if($data['message']['new_chat_participant']['id'] == $bd_user['tg_id'])
{
priv($hello, $data['message']['chat']['id']);
}
else
{
if($mes_from == false) {
kickChatMember($data['message']['chat']['id'], $data['message']['new_chat_participant']['id']);
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question