mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-22 22:22:07 +02:00
Update actions.js
Adding the !help command to instruct the bot to display all configured commands and their descriptions. Lightly formatted.
This commit is contained in:
parent
29c6654dbb
commit
c6926f5481
1 changed files with 12 additions and 0 deletions
|
@ -374,4 +374,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}`;
|
||||
}
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Add table
Reference in a new issue