You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
میخوام پیامهای کانالهایی که عضو هستم رو دریافت کنم ولی بعد از چند ریکوئست ارور زیر رو میده و اکسپشن InvalidAuth رو میده:
exception: {'status': 'ERROR_GENERIC', 'status_det': 'INVALID_AUTH'}
بخشی از کد:
async with Client(session='rubpy') as client:
chats = await client.get_chats()
channels_info = {}
filtered_channels = [chat for chat in chats['chats'] if chat['abs_object']['type'] in ['Group', 'Channel']]
random.shuffle(filtered_channels)
for _ in range(50):
for channel in filtered_channels:
if not channels_info.get(channel['object_guid']):
channels_info[channel['object_guid']] = {
'title' : channel['abs_object']['title'],
'last_message_id' : channel['last_message_id'],
'message_ids': [channel['last_message_id']]
}
else:
channels_info[channel['object_guid']]['last_message_id'] = channel['last_message_id']
if channel['last_message_id'] not in channels_info[channel['object_guid']]['message_ids']:
channels_info[channel['object_guid']]['message_ids'].append(channel['last_message_id'])
messages = await client.get_messages(
channel['object_guid'],
min_id=channels_info[channel['object_guid']]['message_ids'][0],
max_id=channels_info[channel['object_guid']]['message_ids'][-1],
limit=20)```
The text was updated successfully, but these errors were encountered:
میخوام پیامهای کانالهایی که عضو هستم رو دریافت کنم ولی بعد از چند ریکوئست ارور زیر رو میده و اکسپشن InvalidAuth رو میده:
exception:
{'status': 'ERROR_GENERIC', 'status_det': 'INVALID_AUTH'}
بخشی از کد:
The text was updated successfully, but these errors were encountered: