mirror of
https://github.com/idanoo/discord-keyword-bot.git
synced 2024-11-22 08:25:11 +00:00
Add exception to handle crap
This commit is contained in:
parent
1144a4cb2f
commit
0385978520
9
bot.py
9
bot.py
@ -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")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user