使用 Bot 获取加入我的电报频道的用户的 chatID

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.

另外我想知道是否可以使用我的机器人管理员获取我频道的用户列表?

假设我在 C# 中使用 NetTelegramBotApi,我尝试了以下代码但没有成功:

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

不幸的是,官方机器人 API doesn't have service messages for when a user joins a channel yet. However i would like to pint you towards PWRTelegram,这是一个非官方电报 API,它允许很多很酷的东西,还允许作为机器人获取 mtproto 更新(听起来不可能?好吧它做到了)。您可能会找到解决方案。