如何通过我的电报机器人在聊天中标记每个人?
我需要在聊天中添加机器人的聊天中标记每个人。 我的机器人写道: @all,它应该在聊天中标记每个人。 我看不到任何电报API方法可以在特定的聊天中吸引所有用户。我应该如何解决问题?
I need to tag everybody in chat where my bot added.
My bot writes: @all and it should tag everybody in the chat.
I don't see any Telegram API methods to get all users in specific chat. How should I resolve the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一条消息中有各种障碍不会让您提及每个人:
如果您坚持这样做,则应使用数据库来收集有关成员的信息在这些聊天中,当他们发送消息时。之后,您应该发送多个消息以提及所有50 x 50乘50。
如果您想要一种通知所有成员的简单方法,则只需固定消息即可。
There are various obstacles that don't let you mention everyone in a single message:
If you insist on doing this, you should use a database to collect information about the members of these chats, when they send messages. And afterward, you should send multiple messages to mention all of them 50 by 50.
If you want a simple way to notify all members, you can just pin a message.
实际上,可以解析所有聊天成员。
您可以在Telethon库中使用
client.iter_iter_participant(CHAT)
。Actually, it is possible to parse all the chat members.
You can use
client.iter_participants(chat)
in telethon library for this.