Closed JOSDC01 closed 3 years ago
I already have the solution, but the bot must be admin
$permissions = [ 'can_send_messages' => true, 'can_send_media_messages' => true ];
$chatPermissions = json_encode($permissions, true);
$content = array('chat_id' => $chat_id, 'permissions' => $chatPermissions); $telegram->setChatPermissions($content);
And the file Telegram.php you add this
public function setChatPermissions(array $content) { return $this->endpoint('setChatPermissions', $content); }
thanks!
Yes ihave problem for use restrictChatMember and setChatPermissions pls help us! don't work this code
**$content = array( "chat_id" => $chat_id, "user_id" => $new_chat_members['id'], "can_post_messages" => FALSE, ); $uid = $new_chat_members['id']; $telegram->restrictChatMember($content);