Igor.Responder.Proto protocol (Igor v0.3.1)

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)

Summary

Functions

Respond to a message.

Types

t()

@type t() :: term()

Functions

respond(responder, msg, bot)

@spec respond(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.