【问题标题】:Get all the users of a channel in Telegram using telethon library使用 Telethon 库获取 Telegram 中频道的所有用户
【发布时间】:2019-06-24 17:36:05
【问题描述】:

我尝试使用 Telethon 内置方法 (get_participants) 从频道获取所有用户。

def all_participants():

client = TelegramClient('name', api_id, api_hash)
client.start()

all_participants = []
participants = client.get_participants(username)

all_participants.extend(participants.users)
print(all_participants)

【问题讨论】:

  • 我收到错误消息:telethon.errors.rpcerrorlist.ChatAdminRequiredError:在指定的聊天中需要聊天管理员权限

标签: python-3.x telegram telethon


【解决方案1】:

您得到的错误是不言自明的。只有 Telegram 频道的管理员可以查看成员,并且您不是该频道的管理员。

【讨论】:

  • 我知道错误说明了什么。但需要知道是否有机会更改管理员权限然后查看用户。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-07-17
  • 2023-01-26
  • 1970-01-01
  • 1970-01-01
  • 2016-02-23
  • 2021-08-25
  • 2022-07-16
相关资源
最近更新 更多