group or channel?
Bots can't do that
Yes, you are right, The Telegram Bot API doesn't support directly retrieving all uses details from a group due to privacy protection measures.
Even with mtproto api returns only the last 200 members in a channel.
That isn't enough, I think. I have a requirement where I need to add a bot to an existing group, grant it necessary permissions, and enable the bot to access information about all members in the group, such as their IDs. How can I develop this?
Well, you would need to make a userbot. Or just log every joining user but then bot has to be added before everyone else joins
you are right, but I don't like to migrate existing users to other groups..
Then you would need to make a userbot
Hey, do you know when mentioning someone in the group, is it possible to get the user's ids by username?
You won't get a users id by just using their @username via the bot API
ok, how can i get the users id in the group ?
when they write a message or join
ok, thanks. just only these two ways right now...
BUT you can always use mtproto for that. This method will let you get uid by username
And when they use your bot inline and if your bot disables the group chat privacy, it can read all messages. But there must be some form of interaction with your bot in order to get to know their userID
thanks, I understand
wew, that seems like a bit of privacy issue :D
you can't really see if a bot has group privacy enabled when using it inline can you?
I think you misunderstood. My point wasn't that it can see all messages of a group if used inline. My point was that the bot can see all messages when group privacy is disabled and the bot is a member of the group. Using a bot inline is just one more way it can obtain a userID
Обсуждают сегодня