Skip to content

This handler will allow Alice to keep track of people laughing and reply with an image after 93 laughs. It also keeps track of how many times a user has "won" by triggering this handler.

License

Notifications You must be signed in to change notification settings

adamzaninovich/alice_haha

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AliceHaha Hex Version Hex Downloads License: MIT

This handler will allow Alice to keep track of people laughing and reply with an image.

A laugh is considered any of the following:

~r/\b([ha]*ha[ha]*|lo+l|lmf?ao|rofl|roflmao)\b/i

Examples: lol haha lmao rofl loooool ha hahahahahaha roflmao lmfao

Installation

If available in Hex, the package can be installed as:

  1. Add alice_haha to your list of dependencies in mix.exs:
```elixir
defp deps do
   [
     {:websocket_client, github: "jeremyong/websocket_client"},
     {:alice, "~> 0.3"},
     {:alice_haha, "~> 1.0"}
   ]
end
```
  1. Add the handler to your list of registered handlers in mix.exs:
```elixir
def application do
  [applications: [:alice],
    mod: {
      Alice, [Alice.Handlers.Haha, ...]}]
end
```

Usage

Use @alice help for more information.

About

This handler will allow Alice to keep track of people laughing and reply with an image after 93 laughs. It also keeps track of how many times a user has "won" by triggering this handler.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%