Skip to content

Commit

Permalink
system: Ignore DC API Unavailable Error
Browse files Browse the repository at this point in the history
  • Loading branch information
1ukastesar authored and peterdragun committed Apr 30, 2023
1 parent 754e5ed commit 795cde7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rubbergod.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import argparse
import logging
import sys
import traceback

from disnake import AllowedMentions, Embed, Intents, TextChannel
from disnake.errors import DiscordServerError
from disnake.ext import commands

import repository.db_migrations as migrations
Expand Down Expand Up @@ -81,6 +83,9 @@ async def on_ready():

@bot.event
async def on_error(event, *args, **kwargs):
e = sys.exc_info()[1]
if isinstance(e, DiscordServerError) and e.status == 503:
return
channel_out = bot.get_channel(config.bot_dev_channel)
output = traceback.format_exc()
print(output)
Expand Down

0 comments on commit 795cde7

Please sign in to comment.