Yurba.js / @yurbajs/types / CommandHandler
Type Alias: CommandHandler()
CommandHandler = (
message,args) =>Promise<void>
The handler function type for a command.
Parameters
message
The message object.
args
The parsed arguments according to the schema.
Returns
Promise<void>
Example
ts
const handler: CommandHandler = async (message, args) => {
// args.name, args.age, etc.
console.log(args);
};