class
Telecr::Core::Context
- Telecr::Core::Context
- Reference
- Object
Defined in:
core/context.crConstructors
Instance Method Summary
- #answer(text : String | Nil = nil, show_alert : Bool = false, **options)
- #bot : Bot
- #bot=(bot : Bot)
-
#business_connection_id : String | Nil
API 9.6: Business connection ID for Enterprise bots
- #callback_query : Types::CallbackQuery | Nil
-
#chat : Types::Chat | Nil
Get the chat where this update occurred
- #chat_id : Int64 | Nil
- #command? : Bool
- #command_args : String | Nil
- #command_name : String | Nil
- #data : String | Nil
- #document(doc, caption : String | Nil = nil, **options)
- #edit_text(text : String, **options)
-
#from : Types::User | Nil
Get the user who sent this update
- #inline_query : JSON::Any | Nil
-
#managed_bot : Types::ManagedBotUpdated | Nil
API 9.6: Access managed bot updates
-
#match : Regex::MatchData | Nil
Match data from pattern matching (command/hears)
-
#match=(match : Regex::MatchData | Nil)
Match data from pattern matching (command/hears)
- #message : Types::Message | Nil
- #message_id : Int64 | Nil
- #photo(photo, caption : String | Nil = nil, **options)
- #replied_message : Types::Message | Nil
-
#reply(text : String, **options)
Send a text message to the current chat
- #reply? : Bool
-
#reply_draft(text : String, **options)
API 9.6: Native streaming draft support
- #send_chat_action(action : String)
-
#session : Hash(String, JSON::Any)
Session data for this user
-
#session=(session : Hash(String, JSON::Any))
Session data for this user
-
#state : Hash(Symbol, JSON::Any)
Shared state between middlewares - using JSON::Any for flexibility
-
#state=(state : Hash(Symbol, JSON::Any))
Shared state between middlewares - using JSON::Any for flexibility
- #text : String | Nil
- #typing_active : Bool
- #typing_active=(typing_active : Bool)
-
#update : Types::Update
Core properties
-
#update=(update : Types::Update)
Core properties
- #user_id : Int64 | Nil
- #with_typing(&)
Constructor Detail
Instance Method Detail
def state : Hash(Symbol, JSON::Any)
#
Shared state between middlewares - using JSON::Any for flexibility
def state=(state : Hash(Symbol, JSON::Any))
#
Shared state between middlewares - using JSON::Any for flexibility