Skip to content

Commit

Permalink
[Discord] Handle ClientConnectorError in Twitter task
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Oct 18, 2023
1 parent f5ab758 commit 6a9c710
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Discord/cogs/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,9 @@ async def check_tweets(self):
except discord.DiscordServerError as e:
self.bot.print(f"Twitter Task Discord Server Error: {e}")
await asyncio.sleep(60)
except aiohttp.ServerDisconnectedError:
except (
aiohttp.ServerDisconnectedError, aiohttp.ClientConnectorError
):
# TODO: Log
await asyncio.sleep(1)
except Exception as e:
Expand Down

0 comments on commit 6a9c710

Please sign in to comment.