简体   繁体   中英

Getting the chatID of the user who joins my telegram channel using Bot

I want to find out the chatID or username of the the new user who joins my telegram channel where my telegram bot is one of its admins.

Also I want to know whether I can get the users list of my channel using my bot admin or not?

Let say that I'm using NetTelegramBotApi in C#, I have tried the below code but didn't worked:

if (update.ChannelPost.NewChatMember != null)
{
Console.WriteLine(update.ChannelPost.NewChatMember.Id.ToString());
continue;
}

Unfortunately the official bot API doesn't have service messages for when a user joins a channel yet. However i would like to pint you towards PWRTelegram , which is an unofficial telegram API that allows lots of cool stuff and also allows fetching mtproto updates as a bot (Sounds impossible? well it does it). Chances are you may find a solution with it.

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