Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BranchController

Creates and collects branches for each thought process.

Hierarchy

  • BranchController

Implements

Index

Constructors

constructor

  • Create branch controller (branches can be cloned, created or empty). Create branch controller (branches can be cloned, created or empty).

    Parameters

    Returns BranchController

Properties

act

act: object

Type declaration

  • [id: string]: CatchAllBranch

listen

listen: object

Type declaration

  • [id: string]: TextBranch | CustomBranch

serve

serve: object

Type declaration

  • [id: string]: ServerBranch | CustomBranch

understand

understand: object

Type declaration

  • [id: string]: NLUBranch | CustomBranch

Methods

NLU

  • Create a natural language branch to match on NLU result attributes.

    Parameters

    Returns string

add

  • Add branch to thought process by it's class default or given key.

    Parameters

    Returns string

catchAll

  • Create a branch that triggers when no other branch matches.

    Parameters

    Returns string

custom

  • Create custom branch with provided matcher, action and optional meta.

    Parameters

    Returns string

customNLU

  • Create a natural language branch with custom matcher.

    Parameters

    Returns string

customServer

  • Create a server branch with custom matcher.

    Parameters

    Returns string

direct

  • Create text branch pre-matched on the bot name as prefix.

    Parameters

    Returns string

directNLU

  • Create a natural language branch pre-matched on the bot name as prefix.

    Parameters

    Returns string

enter

  • Create a branch that triggers when user joins a room.

    Parameters

    Returns string

exist

  • Check if any branches have been added.

    Parameters

    Returns number | boolean

forced

  • Remove all but forced branches from process, return remaining size.

    Parameters

    Returns number

leave

  • Create a branch that triggers when user leaves a room.

    Parameters

    Returns string

reset

  • reset(): void
  • Empty thought process branch collections.

    Returns void

server

  • Create a branch that triggers when server message matches criteria.

    Parameters

    Returns string

text

  • Create text branch with provided regex, action and options

    Parameters

    Returns string

topic

  • Create a branch that triggers when user changes the topic.

    Parameters

    Returns string

Generated using TypeDoc