Fix: handle errors on init
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
4be48f41d6
commit
7ba0eb5229
1 changed files with 4 additions and 1 deletions
|
@ -261,7 +261,10 @@ class MlmMatrixBot:
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
bot = MlmMatrixBot()
|
bot = MlmMatrixBot()
|
||||||
await bot.init()
|
if not await bot.init():
|
||||||
|
logging.critical("Bot initialization failed")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
await bot.run()
|
await bot.run()
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
|
|
Loading…
Reference in a new issue