Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
Etzelia | d95f937f7a |
|
@ -108,13 +108,17 @@ class Discord(commands.Bot):
|
||||||
|
|
||||||
def run_bot(self):
|
def run_bot(self):
|
||||||
global discord_loop
|
global discord_loop
|
||||||
|
loop = True
|
||||||
|
while loop:
|
||||||
try:
|
try:
|
||||||
discord_loop.run_until_complete(self.start(self.token))
|
discord_loop.run_until_complete(self.start(self.token))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logger.info("Bot received keyboard interrupt")
|
logger.info("Bot received keyboard interrupt")
|
||||||
|
loop = False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
logger.info('Bot encountered the following unhandled exception %s', e)
|
logger.info('Bot encountered the following unhandled exception %s', e)
|
||||||
|
loop = False
|
||||||
|
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
|
|
Loading…
Reference in New Issue