Skip to content

struct Tourmaline::Context
inherits Struct #

Constructors#

.new(client : Client, update : Update) #

View source

Methods#

#answer_callback_query(**kwargs) #

View source

#answer_inline_query(**kwargs) #

View source

#answer_pre_checkout_query(**kwargs) #

View source

#answer_shipping_query(**kwargs) #

View source

#api : Tourmaline::Client #

Slightly shorter alias for the client

View source

#callback_query(*args, **options) #

Pass all update methods to the update object

View source

#callback_query #

Pass all update methods to the update object

View source

#callback_query? #

Pass all update methods to the update object

View source

#callback_query?(*args, **options) #

Pass all update methods to the update object

View source

#channel_post(*args, **options) #

Pass all update methods to the update object

View source

#channel_post #

Pass all update methods to the update object

View source

#channel_post? #

Pass all update methods to the update object

View source

#channel_post?(*args, **options) #

Pass all update methods to the update object

View source

#chosen_inline_result #

Pass all update methods to the update object

View source

#chosen_inline_result(*args, **options) #

Pass all update methods to the update object

View source

#chosen_inline_result? #

Pass all update methods to the update object

View source

#chosen_inline_result?(*args, **options) #

Pass all update methods to the update object

View source

#client : Client #

View source

#command #

Get the command name, return nil if there is no message

View source

#command! #

Get the command name, raise an exception if there is no message

View source

#delete_message(message_id : Int32) #

Context aware message deletion

View source

#edit_live_location(latitude : Float64, longitude : Float64, **kwargs) #

Context aware live location editing

View source

#edit_message(text : String, **kwargs) #

Context aware editing

View source

#edited_channel_post #

Pass all update methods to the update object

View source

#edited_channel_post(*args, **options) #

Pass all update methods to the update object

View source

#edited_channel_post?(*args, **options) #

Pass all update methods to the update object

View source

#edited_channel_post? #

Pass all update methods to the update object

View source

#edited_message #

Pass all update methods to the update object

View source

#edited_message(*args, **options) #

Pass all update methods to the update object

View source

#edited_message? #

Pass all update methods to the update object

View source

#edited_message?(*args, **options) #

Pass all update methods to the update object

View source

#forward_message(to_chat, **kwargs) #

Context aware forward

View source

#inline_query(*args, **options) #

Pass all update methods to the update object

View source

#inline_query #

Pass all update methods to the update object

View source

#inline_query?(*args, **options) #

Pass all update methods to the update object

View source

#inline_query? #

Pass all update methods to the update object

View source

#message #

Retuns the message, edited_message, channel_post, edited_channel_post, callback_query.message, or nil

View source

#message(*args, **options) #

Pass all update methods to the update object

View source

#message #

Pass all update methods to the update object

View source

#message! #

Returns the message, edited_message, channel_post, edited_channel_post, callback_query.message, or raises an exception

View source

#message?(*args, **options) #

Pass all update methods to the update object

View source

#message? #

Pass all update methods to the update object

View source

#pin_message(**kwargs) #

Context aware pinning

View source

#poll(*args, **options) #

Pass all update methods to the update object

View source

#poll #

Pass all update methods to the update object

View source

#poll?(*args, **options) #

Pass all update methods to the update object

View source

#poll? #

Pass all update methods to the update object

View source

#poll_answer #

Pass all update methods to the update object

View source

#poll_answer(*args, **options) #

Pass all update methods to the update object

View source

#poll_answer? #

Pass all update methods to the update object

View source

#poll_answer?(*args, **options) #

Pass all update methods to the update object

View source

#pre_checkout_query(*args, **options) #

Pass all update methods to the update object

View source

#pre_checkout_query #

Pass all update methods to the update object

View source

#pre_checkout_query? #

Pass all update methods to the update object

View source

#pre_checkout_query?(*args, **options) #

Pass all update methods to the update object

View source

#reply(text : String, **kwargs) #

Reply directly to the incoming message

View source

#reply_with_animation(animation, **kwargs) #

Reply directly to the incoming message with a animation

View source

#reply_with_audio(audio, **kwargs) #

Reply directly to the incoming message with a audio

View source

#reply_with_basketball(**kwargs) #

Reply directly to the incoming message with a basketball

View source

#reply_with_bowling(**kwargs) #

Reply directly to the incoming message with a bowling

View source

#reply_with_contact(contact, **kwargs) #

Reply directly to the incoming message with a contact

View source

#reply_with_dart(**kwargs) #

Reply directly to the incoming message with a dart

View source

#reply_with_dice(**kwargs) #

Reply directly to the incoming message with a dice

View source

#reply_with_document(document, **kwargs) #

Reply directly to the incoming message with a document

View source

#reply_with_football(**kwargs) #

Reply directly to the incoming message with a football

View source

#reply_with_invoice(invoice, **kwargs) #

Reply directly to the incoming message with a invoice

View source

#reply_with_location(latitude : Float64, longitude : Float64, **kwargs) #

Reply directly to the incoming message with a location

View source

#reply_with_media_group(media_group, **kwargs) #

Reply directly to the incoming message with a media_group

View source

#reply_with_photo(photo, **kwargs) #

Reply directly to the incoming message with a photo

View source

#reply_with_poll(question : String, options : Array(String), **kwargs) #

Reply directly to the incoming message with a poll

View source

#reply_with_slot_machine(**kwargs) #

Reply directly to the incoming message with a slot_machine

View source

#reply_with_sticker(sticker, **kwargs) #

Reply directly to the incoming message with a sticker

View source

#reply_with_venue(venue, **kwargs) #

Reply directly to the incoming message with a venue

View source

#reply_with_video(video, **kwargs) #

Reply directly to the incoming message with a video

View source

#reply_with_video_note(video_note, **kwargs) #

Reply directly to the incoming message with a video_note

View source

#reply_with_voice(voice, **kwargs) #

Reply directly to the incoming message with a voice

View source

#respond(text : String, **kwargs) #

Respond to the incoming message

View source

#respond_with_animation(animation, **kwargs) #

Respond with a animation

View source

#respond_with_audio(audio, **kwargs) #

Respond with a audio

View source

#respond_with_basketball(**kwargs) #

Respond with a basketball

View source

#respond_with_bowling(**kwargs) #

Respond with a bowling

View source

#respond_with_contact(contact, **kwargs) #

Respond with a contact

View source

#respond_with_dart(**kwargs) #

Respond with a dart

View source

#respond_with_dice(**kwargs) #

Respond with a dice

View source

#respond_with_document(document, **kwargs) #

Respond with a document

View source

#respond_with_football(**kwargs) #

Respond with a football

View source

#respond_with_invoice(invoice, **kwargs) #

Respond with a invoice

View source

#respond_with_location(latitude : Float64, longitude : Float64, **kwargs) #

Respond with a location

View source

#respond_with_media_group(media_group, **kwargs) #

Respond with a media_group

View source

#respond_with_photo(photo, **kwargs) #

Respond with a photo

View source

#respond_with_poll(question : String, options : Array(String), **kwargs) #

Respond with a poll

View source

#respond_with_slot_machine(**kwargs) #

Respond with a slot_machine

View source

#respond_with_sticker(sticker, **kwargs) #

Respond with a sticker

View source

#respond_with_venue(venue, **kwargs) #

Respond with a venue

View source

#respond_with_video(video, **kwargs) #

Respond with a video

View source

#respond_with_video_note(video_note, **kwargs) #

Respond with a video_note

View source

#respond_with_voice(voice, **kwargs) #

Respond with a voice

View source

#send_chat_action(action : String | ChatAction) #

Context aware chat actions

View source

#shipping_query #

Pass all update methods to the update object

View source

#shipping_query(*args, **options) #

Pass all update methods to the update object

View source

#shipping_query? #

Pass all update methods to the update object

View source

#shipping_query?(*args, **options) #

Pass all update methods to the update object

View source

#text(strip_command = true) #

Get the message text, return nil if there is no message

View source

#text!(strip_command = true) #

Get the message text, raise an exception if there is no message

View source

#unpin_message(**kwargs) #

Context aware unpinning

View source

#update : Update #

View source

#with_message #

If the update contains a message, pass it to the block. Less boilerplate.

View source