bothy-sdk
    Preparing search index...

    Class CommandSpec

    A command the adapter declares; maps to CommandRegister.

    new CommandSpec("status", "Show the run status").toRegister().name; // "status"
    
    Index

    Constructors

    • Declares a command.

      Parameters

      • name: string

        The command name.

      • description: string

        At most command.description_max_chars characters.

      • options: CommandSpecOptions = {}

        Options, scope, required level and the control flag.

      Returns CommandSpec

    Properties

    control: boolean

    Whether it is a control command.

    description: string

    At most command.description_max_chars characters.

    name: string

    The command name.

    options: readonly {}[]

    The options.

    requiredLevel: string | undefined

    The required level, if not the default.

    scopeId: string | undefined

    The scope target, if any.

    scopeKind: string | undefined

    Where it applies, if not the server default.

    Methods

    • Builds the generated CommandRegister.

      Parameters

      • settings: SdkSettings = DEFAULTS

        The limit command.description_max_chars (default DEFAULTS).

      Returns {}

      The registration body.

      RangeError when the description is longer than the limit or the scope kind or the level is outside its vocabulary.