fix(bot): handle missing shutdown config keys

Set default values for `shutdown_title` and `shutdown_message` if they are not present in the config. This prevents potential errors when these keys are missing, ensuring smoother bot initialization.
This commit is contained in:
Kumi 2024-08-09 11:43:34 +02:00
parent dc73ef6700
commit 798fcc361e
Signed by: kumi
GPG key ID: ECBCC9082395383F

3
bot.py
View file

@ -235,6 +235,9 @@ async def main():
if "shutdown" in config:
shutdown_title = config["shutdown"].get("title")
shutdown_message = config["shutdown"].get("message")
else:
shutdown_title = None
shutdown_message = None
# Create and start the bot
bot = RoombaBot(