Butler

Butler is a life betterment robot.

He is split into two main groups:

  • Butler.Adapter - adapters allow butler to communicate with other protocols and communications platforms.

  • Butler.Plugin - plugins are what empower butler. They provide an api to respond to specific commands and perform actions and replies.

Adapters

Butler.Adapter is a generic behaviour that allows Butler to support multiple chat platforms. There are two officialy supported adapters:

You can read more about developing adapters in Butler.Adapter.

Plugins

Butler.Plugin provides an api for developers to add functionality to Butler. Plugins listen to events emitted by Butler and can choose to respond or not. Here is an example plugin:

defmodule MyPlugin do
  use Butler.Plugin

  @usage "#{name} test <phrase> - Lets the user know that they got the message"
  respond(~r/test (.*)$/, [_all, phrase], conn) do
    reply conn, "I heard #{phrase}"
  end

  @usage "lambda - expresses a love for lambdas to the channel"
  hear(~r/lambda/, conn) do
    say conn, "lambda all the things"
  end
end

If you want to read more about creating your own plugins in Butler.Plugin.

Summary

Functions

Starts Butler

Stops Butler

Functions

start(type, opts \\ [])

Starts Butler.

stop(arg1)

Stops Butler.