Compare commits
2 Commits
aabc6d142f
...
ce12028aa2
Author | SHA1 | Date |
---|---|---|
blank X | ce12028aa2 | |
blank X | 0ef940e065 |
|
@ -22,13 +22,14 @@ async def main():
|
||||||
text = log_ring.popleft()
|
text = log_ring.popleft()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
pass
|
pass
|
||||||
while True:
|
else:
|
||||||
try:
|
while True:
|
||||||
await slave.send_message(config['config']['log_chat'], text, disable_web_page_preview=True)
|
try:
|
||||||
except FloodWait as ex:
|
await slave.send_message(config['config']['log_chat'], text, disable_web_page_preview=True)
|
||||||
await asyncio.sleep(ex.x + 1)
|
except FloodWait as ex:
|
||||||
else:
|
await asyncio.sleep(ex.x + 1)
|
||||||
break
|
else:
|
||||||
|
break
|
||||||
asyncio.create_task(log_ring_worker())
|
asyncio.create_task(log_ring_worker())
|
||||||
await asyncio.gather(*(_start_app(app) for app in apps), slave.start())
|
await asyncio.gather(*(_start_app(app) for app in apps), slave.start())
|
||||||
await idle()
|
await idle()
|
||||||
|
|
|
@ -93,4 +93,3 @@ async def log_reports(client, message):
|
||||||
text += f'</a></b> {html.escape(mtext.strip()[:1000])}'
|
text += f'</a></b> {html.escape(mtext.strip()[:1000])}'
|
||||||
log_ring.append(text)
|
log_ring.append(text)
|
||||||
reported[message.chat.id].add(message.message_id)
|
reported[message.chat.id].add(message.message_id)
|
||||||
reported[reply.chat.id].add(reply.message_id)
|
|
||||||
|
|
Loading…
Reference in New Issue