Type Alias: CommandHandler()
CommandHandler = (
message,args) =>Promise<void>
The handler function type for a command.
Parameters
| Name | Type | Description |
|---|---|---|
message | MessageModel | The message object. |
args | CommandArgsSchema | 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);
};