Merge pull request #542 from ccheney/attr-error-lower

command_name null check before calling .lower()
pull/908/head
Richard Beales 2023-04-12 09:54:05 +01:00 committed by GitHub
commit 4dbf72159d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ while True:
f"COMMAND = {Fore.CYAN}{command_name}{Style.RESET_ALL} ARGUMENTS = {Fore.CYAN}{arguments}{Style.RESET_ALL}")
# Execute command
if command_name.lower().startswith( "error" ):
if command_name is not None and command_name.lower().startswith( "error" ):
result = f"Command {command_name} threw the following error: " + arguments
elif command_name == "human_feedback":
result = f"Human feedback: {user_input}"