0


我正在使用此代码将我的一些用户添加到超级组,但它不起作用
,它有什么问题吗?

function makereq($method,$datas=[])
{
    $url = "https://api.telegram.org/bot".API_KEY."/".$method;
    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch,CURLOPT_POSTFIELDS,http_build_query($datas));
    $res = curl_exec($ch);
    if(curl_error($ch)){
        var_dump(curl_error($ch));
    }else{
        return json_decode($res);
    }
}
makereq('promoteChatMember',[
    'chat_id'=>$chat_id,
    'user_id'=>$user_id
  ]);
4

1 回答 1

0

Bots 不能将用户添加到组/频道,promoteChatMember用于使现有成员具有管理员权限。

您只能发送群组的邀请链接,并且他们需要自己加入。:(

于 2017-09-04T21:15:41.103 回答