Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Shell

Load prompts and render chat in shell, for testing interactions

Hierarchy

Index

Constructors

constructor

  • new Shell(bot: "/home/circleci/repo/src/index"): Shell
  • Create an adapter instance. Adapter modules should provide a .use method that accepts the bot, to provide to their adapter class constructor, returning the instance.

    Parameters

    • bot: "/home/circleci/repo/src/index"

      The current bBot instance

    Returns Shell

Properties

bot

bot: "/home/circleci/repo/src/index"

The current bBot instance

line

line: Separator = new inquirer.Separator()

logs

logs: string[] = ['']

messages

messages: [string, string][] = []

name

name: string = "shell-message-adapter"

Optional room

room: undefined | object

roomName

roomName: undefined | string = process.env.BOT_SHELL_ROOM

Optional transport

transport: Transport

ui

ui: any

Optional user

user: User

userId

userId: undefined | string = process.env.BOT_SHELL_USER_ID

userName

userName: undefined | string = process.env.BOT_SHELL_USER_NAME

Methods

dispatch

  • dispatch(envelope: Envelope): Promise<void>

log

  • log(logEvent: any, callback: any): void
  • Write log events to the inquirer UI

    Parameters

    • logEvent: any
    • callback: any

    Returns void

logSetup

  • logSetup(): void

prompt

  • prompt(): Promise<void>
  • Prompt for message input, recursive after each render

    Returns Promise<void>

render

  • render(): Promise<void>
  • Update chat window and return to input prompt

    Returns Promise<void>

roomSetup

  • roomSetup(): Promise<void>
  • Write prompt to collect room and user name, or take from env settings

    Returns Promise<void>

shutdown

  • shutdown(): Promise<void>

start

  • start(): Promise<void>

Object literals

settings

settings: object

chatSize

chatSize: number = 5

Generated using TypeDoc