简体   繁体   中英

Get members id from telegram channel - pyTelegramBotApi

I'm doing a bot, in which I want the user to start the bot to verify that the user of the telegram channel. I'm programming in python with the api telebot.

With this I get the user.id of the user:

idUser = str (message.from_user.id)

With this I have managed to obtain the number of users, but not the ids to do the verification:

members = tb.get_chat_members_count ("@ ChannelName")

根据文档,所有 api 方法都是可调用的,但已修改为 python 标准,因此它将成为

memberobject = tb.get_chat_member(channel,userid)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM