Merge pull request #334 from hackdefendr/main

Adding !help from the TODO project
This commit is contained in:
Max Robinson 2025-01-05 15:18:59 -06:00 committed by GitHub
commit 65a6d0f32d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -420,4 +420,16 @@ export const actionsList = [
// return 'Set npc goal: ' + agent.npc.data.curr_goal.name;
// }
// },
{
name: '!help',
description: 'Lists all available commands and their descriptions.',
perform: async function (agent) {
const commandList = actionsList.map(action => {
return `${action.name.padEnd(15)} - ${action.description}`; // Ensure consistent spacing
}).join('\n');
console.log(commandList);
return `Available Commands:\n${commandList}`;
}
},
];