General fixes
This commit is contained in:
parent
c0d035fcb4
commit
e5962cfdc3
|
@ -1,2 +1,3 @@
|
||||||
config.yaml
|
config.yaml
|
||||||
redditbot.session*
|
redditbot.session*
|
||||||
|
redditbot.json
|
||||||
|
|
|
@ -172,10 +172,8 @@ async def main():
|
||||||
except asyncio.TimeoutError:
|
except asyncio.TimeoutError:
|
||||||
give_ups.add(unique_id)
|
give_ups.add(unique_id)
|
||||||
logging.error('%s timed out', chat)
|
logging.error('%s timed out', chat)
|
||||||
for i in bot_admins:
|
return
|
||||||
await client.send_message(i, f'{chat} timed out')
|
except Exception:
|
||||||
break
|
|
||||||
except BaseException:
|
|
||||||
give_ups.add(unique_id)
|
give_ups.add(unique_id)
|
||||||
logging.exception(chat)
|
logging.exception(chat)
|
||||||
for i in bot_admins:
|
for i in bot_admins:
|
||||||
|
@ -186,7 +184,7 @@ async def main():
|
||||||
random_post, cpp = result
|
random_post, cpp = result
|
||||||
try:
|
try:
|
||||||
await _actual_start_post(random_post, [chat], cpp, show_nsfw_warning, show_spoilers_warning)
|
await _actual_start_post(random_post, [chat], cpp, show_nsfw_warning, show_spoilers_warning)
|
||||||
except BaseException:
|
except Exception:
|
||||||
logging.exception(random_post.id)
|
logging.exception(random_post.id)
|
||||||
for i in bot_admins:
|
for i in bot_admins:
|
||||||
await client.send_message(i, f'{random_post.id}\n{traceback.format_exc()}', parse_mode=None)
|
await client.send_message(i, f'{random_post.id}\n{traceback.format_exc()}', parse_mode=None)
|
||||||
|
|
Loading…
Reference in New Issue