聊天室.megagroup在电视马拉松中没有显示所有的组

2024-06-16 11:21:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我在用chat.megagroup==true 它没有显示所有通道(在m==1), 它也有一些问题,比如有时显示A组和B组,有时显示A组或B组,有时显示C组, 我不知道为什么会发生这样的事,甚至连代码都没有改变。你知道吗

脚本总体上运行得很好,但唯一的问题是我有时没有需要使用的组。你知道吗

result = client(GetDialogsRequest(
             offset_date=last_date,
             offset_id=0,
             offset_peer=InputPeerEmpty(),
             limit=chunk_size,
             hash = 0))

chats.extend(result.chats)
dialogs = client.get_dialogs()

m = input("1: For only permitted groups \n2: For all groups\n")
if m=='1':
    for chat in chats:
        try:
            if chat.megagroup == True:
                groups.append(chat)
        except:
            continue
elif m=='2':
    for i in dialogs:
        try:
            i.entity.status
        except:
            groups.append(i)
            continue

m==2中,显示所有组。 你能告诉我我做错了什么还是别的什么吗?你知道吗


Tags: inclientfordateifchatresultoffset