用于自动添加和删除成员的聊天 API [英] Chat API to add and remove members automatically
问题描述
我正在与一个使用电报应用发送足球比赛投注提示的人合作.他希望该组是私有的,现在他正在手动添加和删除所有成员.该组正在增长,现在有 300 多个成员,这使他的工作更加困难,他想要的是一种自动添加和删除组成员的方式.有没有让我这样做的api?如果需要,我愿意更改为另一个聊天应用程序.
I'm working with a guy who uses telegram app to send bet tips on football matches. He wants the group to be private, right now he is adding and removing all members manually. The group is growing and now has more than 300 members which makes his job harder, what he wants is an automatic way of adding and removing members from the group . Is there any api that let me do this? I'm open to change to another chat app if it's needed.
推荐答案
与机器人 API 一样,不能将成员直接添加到组中,您仍然可以将他们踢出去.
As with the bot API, it is NOT possible to add members directly to the group, you can still kick them out.
但是,通过使用用户机器人(MTPROTO 客户端)仍然可以实现您的要求.如果您打算使用 PHP,我建议您查看 MadelineProto.我将列出您可以使用的方法:
However what you are asking is still possible by using a user bot (MTPROTO client). If you are going to use PHP, I suggest you look at MadelineProto. I will list the methods you can use:
- channels.inviteToChannel(适用于超级组)
- channels.editBanned(适用于超级组)
- channels.inviteToChannel (Works with supergroups)
- channels.editBanned (Works with supergroups)
使用这两种方法,您可以轻松实现目标.
Using the two methods you can easily achive your aim.
这篇关于用于自动添加和删除成员的聊天 API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!