Implements code execution command!

This allows the AI to execute code inside it's workspace folder.
This commit is contained in:
Torantulino
2023-04-01 16:01:36 +01:00
parent 29d8fa5d38
commit de975d3bf9
6 changed files with 37 additions and 43 deletions

View File

@@ -191,9 +191,9 @@ while True:
# Exectute command
if command_name.lower() != "error":
result = cmd.execute_command(command_name, arguments)
result = f"Command {command_name} returned: {cmd.execute_command(command_name, arguments)}"
else:
result ="Error: " + arguments
result =f"Command {command_name} threw the following error: " + arguments
# Check if there's a result from the command append it to the message history
if result != None: