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
If available in Hex, the package can be installed as:
- Add
alice_haha
to your list of dependencies inmix.exs
:
```elixir
defp deps do
[
{:websocket_client, github: "jeremyong/websocket_client"},
{:alice, "~> 0.3"},
{:alice_haha, "~> 1.0"}
]
end
```
- Add the handler to your list of registered handlers in
mix.exs
:
```elixir
def application do
[applications: [:alice],
mod: {
Alice, [Alice.Handlers.Haha, ...]}]
end
```
Use @alice help
for more information.