class
Hamilton::CmdHandler
- Hamilton::CmdHandler
- Reference
- Object
Overview
The module for handling commands, callback queries (please, do not use them), known text messages, and some of messages payloads.
Should be included in the class with the implementations of updates' handling functions.
Included Modules
Defined in:
handlers/cmd_handler.crConstructors
Instance Method Summary
-
#call(update : Hamilton::Types::Update)
Handling method that processes an update.
- #caller : Hash(Symbol, Proc(Hamilton::Types::Update, Hamilton::Storage, NamedTuple(method: Symbol | Nil, data: Hamilton::Storage)))
- #caller=(caller : Hash(Symbol, Proc(Hamilton::Types::Update, Hamilton::Storage, NamedTuple(method: Symbol | Nil, data: Hamilton::Storage))))
-
#context : Hamilton::Context
Context for the current bot sessions.
-
#context=(context : Hamilton::Context)
Context for the current bot sessions.
-
#log : Log
Logger instance.
-
#log=(log : Log)
Logger instance.
-
#mapper : Hash(Symbol, Hash(String | Symbol, Symbol))
Mapping between methods and mapper between update types and methods to handle them.
-
#mapper=(mapper : Hash(Symbol, Hash(String | Symbol, Symbol)))
Mapping between methods and mapper between update types and methods to handle them.
Instance methods inherited from module Hamilton::Handler
call(update : Hamilton::Types::Update)
call,
call_next(update : Hamilton::Types::Update) : Nil
call_next,
next : Handler | HandlerProc | Nil
next,
next=(next __arg0 : Handler | HandlerProc | Nil)
next=
Instance methods inherited from class Reference
==(other : Hamilton::Any)
==
Instance methods inherited from class Object
===(other : Hamilton::Any)
===
Constructor Detail
Instance Method Detail
def call(update : Hamilton::Types::Update)
#
Description copied from module Hamilton::Handler
Handling method that processes an update.
def caller : Hash(Symbol, Proc(Hamilton::Types::Update, Hamilton::Storage, NamedTuple(method: Symbol | Nil, data: Hamilton::Storage)))
#
def caller=(caller : Hash(Symbol, Proc(Hamilton::Types::Update, Hamilton::Storage, NamedTuple(method: Symbol | Nil, data: Hamilton::Storage))))
#
def mapper : Hash(Symbol, Hash(String | Symbol, Symbol))
#
Mapping between methods and mapper between update types and methods to handle them.
def mapper=(mapper : Hash(Symbol, Hash(String | Symbol, Symbol)))
#
Mapping between methods and mapper between update types and methods to handle them.