bocoup / chatter

A collection of useful primitives for creating interactive chat bots.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow commands to have an "aliases" array / regexp / function

cowboy opened this issue · comments

Right now, chatter commands only respond on the command name, which is a single, fixed value (so that the help output can be meaningful). In order to support this, we'll need commands to be able to accept a list of aliases or a function that determines if the message matches.

Chatter commands should support the following:

<you> pombot help
* bot sees "pombot help"
* leading "pombot" (plus whitespace) is removed, "help" remains

<you> @pombot help
* bot sees something like "<@U123456> help"
* bot needs to figure out its own user id and match on that, which it can do,
  but needs to be coded in there

<you> pombot: help
* bot sees "pombot: help"
* leading "pombot" (plus whitespace) is removed, ": help" remains, bot needs to
  also be aware of and remove punctuation