mirror of
https://github.com/idanoo/discord-keyword-bot
synced 2025-07-01 05:32:15 +00:00
Add exception to handle crap
This commit is contained in:
parent
1144a4cb2f
commit
0385978520
1 changed files with 7 additions and 2 deletions
9
bot.py
9
bot.py
|
@ -18,5 +18,10 @@ class MyClient(discord.Client):
|
|||
await channel.send(message.content)
|
||||
|
||||
load_dotenv()
|
||||
client = MyClient()
|
||||
client.run(os.getenv("DISCORD_TOKEN"), bot=False)
|
||||
while True:
|
||||
try:
|
||||
client = MyClient()
|
||||
client.run(os.getenv("DISCORD_TOKEN"), bot=False)
|
||||
except:
|
||||
print("Error Occurred... retrying")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue