Add exception to handle crap

This commit is contained in:
Daniel Mason 2020-03-23 19:45:55 +13:00
parent 1144a4cb2f
commit 0385978520

9
bot.py
View File

@ -18,5 +18,10 @@ class MyClient(discord.Client):
await channel.send(message.content) await channel.send(message.content)
load_dotenv() load_dotenv()
client = MyClient() while True:
client.run(os.getenv("DISCORD_TOKEN"), bot=False) try:
client = MyClient()
client.run(os.getenv("DISCORD_TOKEN"), bot=False)
except:
print("Error Occurred... retrying")