PiceCommand - shysolocup/pice GitHub Wiki

Info:

Type
command data created after a command is ran

AeplSubClass

Arguments:

  • string String
    the raw command string
  • ?pkg String
    name of the npm package you want to install
    can also put arguments in the name as well if you need to
  • ?argsList Object
    the list of the command's raw arguments
  • ?args Object
    the given arguments for the command

Properties

Type

Description

🛈 str String a raw command string 🛈 pkg String name of the package 🛈 argsList Object list of the command's raw arguments 🛈 args Object the given arguments for the command 🛈 async Boolean if the command is async or not 🛈 __executor Buffer the executor for the command 🛈 __listeners Object event listener storage

Methods

Type

Description

🛈 then() Function runs after the package has been installed and automatically requires it
🛈 catch() Function catches errors in async
🛈 finally() Function last thing to run after then is finished

JS
const pice = require('pice');

let cmd = pice.install("@stews/soup");

cmd.then( (Soup) => {
    console.log( new Soup([ 1, 2, 3 ]) );
});


⚠️ **GitHub.com Fallback** ⚠️