Open ghost opened 10 years ago
I don't even...
You need to stop confusing the issue tracker with StackOverflow. The functions for sending a message and leaving a group are already there. All you need to do is use them.
I know but my question is how?! I've founded the functions.
public function onGroupsParticipantsAdd($phone, $gid, $participant){
wBot::getInstance()->debugMsg('#SMN_WAS_ADDED_TO_GROUP# ' . $phone . ' > ' . $gid . ' > ' . $participant);
//oops, bot was added somewhere
if(wBot::getInstance()->sender == strstr($participant, '@', true)){
wBot::getInstance()->api->sendGroupsLeave($gid);
}
}
Hi,
Sorry for my lot of issues but i've got a question. Is it possible that if the bot will be added to a group it automatically sends a message and leaves? If this is possible could you give me a example code please?