Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add !behavior command #43

Open
zpatrick opened this issue Apr 3, 2018 · 1 comment
Open

Add !behavior command #43

zpatrick opened this issue Apr 3, 2018 · 1 comment
Assignees
Labels
Feature New feature or request Hard This item is expected to be a hard level of difficulty

Comments

@zpatrick
Copy link
Contributor

zpatrick commented Apr 3, 2018

The name 'behavior' is probably too overloaded; should find a different one: trigger, function, etc.

Add a new !behavior command that will manage behavior objects.
A behavior has a pattern (probably regex) that will be ran against each message.
When the pattern matches, the behavior's function will execute.
Like aliases, we will want to allow templating in the function string.

!behavior add: Adds a new behavior object

!behavior add [--disabled] NAME PATTERN FUNCTION

!behavior ls: Lists behaviors

!behavior ls [--count=10] [--ascending]

!behavior rm: Remove a behavior

!behavior rm NAME

!behavior enable: Enable a behavior

!behavior enable NAME

!behavior disable: Disable a behavior

!behavior disable NAME

A simple example would be saying "hello" whenever someone else does:

user: !behavior add Welcome "[Hh]ello" "!echo Hello!"
@zpatrick zpatrick added Feature New feature or request Hard This item is expected to be a hard level of difficulty labels Apr 3, 2018
@nehayward
Copy link
Contributor

nehayward commented Apr 4, 2018

I like the name Trigger or Funtionless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Hard This item is expected to be a hard level of difficulty
Projects
None yet
Development

No branches or pull requests

2 participants