Hedwig v1.0.0-rc2 Hedwig.Adapter behaviour

Hedwig Adapter Behaviour

An adapter is the interface to the service your bot runs on. To implement an adapter you will need to translate messages from the service to the Hedwig.Message struct and call Hedwig.Robot.handle_message(robot, msg).

Summary

Types

opts :: any
robot :: pid
state :: term

Callbacks

emote(pid, msg)

Specs

emote(pid, msg) :: term
init({})

Specs

init({robot, opts}) :: {:ok, state}
reply(pid, msg)

Specs

reply(pid, msg) :: term
send(pid, msg)

Specs

send(pid, msg) :: term