agalaframework / agala

Full featured messaging bot framework.
68 stars 7 forks source link

Thor like handlers for simple command bots #6

Open Virviil opened 7 years ago

Virviil commented 7 years ago
%Agala.Thor.Command{
  command: string,
  payload: Map.t
}

If this structure comes from previous chain, it can be pushed to Thor like handler:

defmodule Handler
  use Agala.Thor

  @desc "my method"
  def my_method() do
    :something
  end
end
Virviil commented 7 years ago

http://teamon.eu/2017/thor-like-cli-elixir-macros/