Igor v0.3.0 Igor.Responder.Proto protocol View Source
Responder protocol.
See also Igor.Responder.Helper
and Igor.Responder.ModuleHelper
, which
define macros to help with writing responders.
Any module can be used as a responder if it implements respond(msg, bot)
Link to this section Summary
Functions
Respond to a message.
Link to this section Types
Link to this section Functions
Link to this function
respond(responder, msg, bot)
View Sourcerespond(responder :: t(), msg :: Igor.Message.t(), bot :: Igor.t()) :: any()
Respond to a message.
This function will be called whenever a message is received, and the
responder can respond to the message, for example by calling Igor.send/3
.
responder
is the responder itself, msg
is the message to respond to,
and bot
is a handle for the bot, which can be used when calling the
Igor.*
functions.