如何解决洪水等待错误等待结果


[12:36:26] Joining @acharaexchange...
ERROR:telethon.client.updates:Unhandled exception on join_start
Traceback (most recent call last):
File "/storage/emulated/0/yul/msg2/telethon/client/updates.py", line 284, in _dispatch_update
await callback(event)
File "join.py", line 83, in join_start
await client(JoinChannelRequest(channel_name))
File "/storage/emulated/0/yul/msg2/telethon/client/users.py", line 48, in __call__
result = await future
telethon.errors.rpcerrorlist.FloodWaitError: A wait of 205 seconds is required

任何人都可以帮助我如何解决它,如果出现这种情况,我想这样做,如何让它重新启动或让时间睡眠并自动继续

我的脚本是这样的

加入频道

@client.on(events.NewMessage(chats=dogeclick_channel, incoming=True))
async def join_start(event):
message = event.raw_text
if 'You must join' in message:  
channel_name = re.search(r'You must join @(.*?) to earn', message).group(1)
print_msg_time(f'Joining @{channel_name}...')
# joining
await client(JoinChannelRequest(channel_name))
print_msg_time(f'Verifying...')

试试这个

async def join_start(event):
if True :
try:
message = event.raw_text
if 'You must join' in message:  
channel_name = re.search(r'You must join @(.*?) to earn', message).group(1)
print_msg_time(f'Joining @{channel_name}...')
hidden = random. randrange(20, 45)
print_msg_time('Sending /join command')
time.sleep(hidden)
await client(JoinChannelRequest(channel_name))
# Join the channel
print_msg_time(f'Verifying...')

# Clicks the joined
await client(GetBotCallbackAnswerRequest(
peer=url_channel,
msg_id=event.message.id,
data=event.message.reply_markup.rows[0].buttons[1].data
))
except errors.FloodWaitError as e:
print('Flood wait for ', e.seconds)
exit

最新更新