Skip to content

Yurba.js / yurba.js / CommandDefinition

Interface: CommandDefinition

Represents the definition of a command.

Example

ts
{
 *   name: "greet",
 *   description: "Send a greeting",
 *   options: [
 *     { name: "user", type: "user", required: true, description: "User to greet" }
 *   ],
 *   handler: async (message, args) => {
 *     // Implementation here
 *   }
 * }

Properties

description

description: string


handler()

handler: (message, args) => Promise<void>

Parameters

message

Message

args

any

Returns

Promise<void>


name

name: string


options

options: CommandOption[]