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:
parent
dc73ef6700
commit
798fcc361e
1 changed files with 3 additions and 0 deletions
3
bot.py
3
bot.py
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue