Telegex.Plug.Presets.Commander behaviour (Telegex.Plug v0.3.0) View Source

Command processing plug-in.

Link to this section Summary

Types

Match results.

Callbacks

Handle commands.

Match commands.

Link to this section Types

Specs

match_result() :: {:match | :nomatch, Telegex.Plug.state()}

Match results.

Link to this section Callbacks

Specs

handle(message :: Telegex.Model.Message.t(), state :: Telegex.Plug.state()) ::
  Telegex.Plug.stateful()

Handle commands.

Specs

match(text :: String.t(), state :: Telegex.Plug.state()) :: match_result()

Match commands.

This function can be automatically generated by use this module.