experiments in a post-browser web
1/**
2 * Template command - use this as a starting point for new commands
3 *
4 * To create a new command:
5 * 1. Copy this file to a new file named after your command (e.g., mycommand.js)
6 * 2. Update the name and execute function
7 * 3. Import the command in index.js and add it to the commands array
8 */
9
10export default {
11 // Command name - what the user will type to execute this command
12 name: 'template',
13
14 // Execute function - called when the command is selected
15 execute: async (msg) => {
16 console.log('template command executed', msg);
17
18 // Parse any arguments from the command
19 const parts = msg.typed.split(' ');
20 parts.shift(); // Remove the command name
21
22 const args = parts.join(' ');
23
24 // Implement your command logic here
25
26 // Return a result object
27 return {
28 command: 'template',
29 success: true,
30 // Add other properties as needed
31 };
32 }
33};