From e87728aa06a5ca7e9ff2435dea72e3abac81645f Mon Sep 17 00:00:00 2001 From: "Kees C. Bakker" Date: Wed, 25 Apr 2018 00:57:07 +0200 Subject: [PATCH] Added alias, name, helpCommands and loadFile (#25012) * Added some extra defintions - Alias and name can be used to identify the name of the bot. - helpCommands will list all help commands - loadFile will load a script file from a directory into the bot * Update index.d.ts * Making CLI happy. --- types/hubot/index.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types/hubot/index.d.ts b/types/hubot/index.d.ts index 7da5501736..1b90a512af 100644 --- a/types/hubot/index.d.ts +++ b/types/hubot/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for hubot 2.19 // Project: https://github.com/github/hubot // Definitions by: Dirk Gadsden +// Kees C. Bakker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace Hubot { @@ -33,12 +34,16 @@ declare namespace Hubot { type ListenerCallback = (response: Response) => void; class Robot { + alias: string; brain: Brain; + name: string; readonly adapter: A; constructor(adapterPath: string, adapter: string, httpd: boolean, name: string, alias?: string); hear(regex: RegExp, callback: ListenerCallback): void; hear(regex: RegExp, options: any, callback: ListenerCallback): void; + helpCommands(): string[]; + loadFile(directory: string, fileName: string): void; respond(regex: RegExp, callback: ListenerCallback): void; respond(regex: RegExp, options: any, callback: ListenerCallback): void; }