struct

Tourmaline::Context

Inherits Struct / Value / Object

Constructors

new(client : Client, update : Update)
Source

Instance methods

answer_callback_query
Source
answer_inline_query
Source
answer_pre_checkout_query
Source
answer_shipping_query
Source
api

Slightly shorter alias for the client

Source
callback_query(*args, **options)

Pass all update methods to the update object

Source
callback_query(*args, **options, &)

Pass all update methods to the update object

Source
callback_query?(*args, **options)

Pass all update methods to the update object

Source
callback_query?(*args, **options, &)

Pass all update methods to the update object

Source
channel_post(*args, **options)

Pass all update methods to the update object

Source
channel_post(*args, **options, &)

Pass all update methods to the update object

Source
channel_post?(*args, **options)

Pass all update methods to the update object

Source
channel_post?(*args, **options, &)

Pass all update methods to the update object

Source
chosen_inline_result(*args, **options)

Pass all update methods to the update object

Source
chosen_inline_result(*args, **options, &)

Pass all update methods to the update object

Source
chosen_inline_result?(*args, **options)

Pass all update methods to the update object

Source
chosen_inline_result?(*args, **options, &)

Pass all update methods to the update object

Source
client
Source
command

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

Source
command!

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

Source
delete_message(message_id : Int32)

Context aware message deletion

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

Context aware live location editing

Source
edit_message(text : String, **kwargs)

Context aware editing

Source
edited_channel_post(*args, **options)

Pass all update methods to the update object

Source
edited_channel_post(*args, **options, &)

Pass all update methods to the update object

Source
edited_channel_post?(*args, **options)

Pass all update methods to the update object

Source
edited_channel_post?(*args, **options, &)

Pass all update methods to the update object

Source
edited_message(*args, **options)

Pass all update methods to the update object

Source
edited_message(*args, **options, &)

Pass all update methods to the update object

Source
edited_message?(*args, **options)

Pass all update methods to the update object

Source
edited_message?(*args, **options, &)

Pass all update methods to the update object

Source
forward_message(to_chat, **kwargs)

Context aware forward

Source
inline_query(*args, **options)

Pass all update methods to the update object

Source
inline_query(*args, **options, &)

Pass all update methods to the update object

Source
inline_query?(*args, **options)

Pass all update methods to the update object

Source
inline_query?(*args, **options, &)

Pass all update methods to the update object

Source
message

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

Source
message(*args, **options)

Pass all update methods to the update object

Source
message(*args, **options, &)

Pass all update methods to the update object

Source
message!

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

Source
message?(*args, **options)

Pass all update methods to the update object

Source
message?(*args, **options, &)

Pass all update methods to the update object

Source
pin_message

Context aware pinning

Source
poll(*args, **options)

Pass all update methods to the update object

Source
poll(*args, **options, &)

Pass all update methods to the update object

Source
poll?(*args, **options)

Pass all update methods to the update object

Source
poll?(*args, **options, &)

Pass all update methods to the update object

Source
poll_answer(*args, **options)

Pass all update methods to the update object

Source
poll_answer(*args, **options, &)

Pass all update methods to the update object

Source
poll_answer?(*args, **options)

Pass all update methods to the update object

Source
poll_answer?(*args, **options, &)

Pass all update methods to the update object

Source
pre_checkout_query(*args, **options)

Pass all update methods to the update object

Source
pre_checkout_query(*args, **options, &)

Pass all update methods to the update object

Source
pre_checkout_query?(*args, **options)

Pass all update methods to the update object

Source
pre_checkout_query?(*args, **options, &)

Pass all update methods to the update object

Source
reply(text : String, **kwargs)

Reply directly to the incoming message

Source
reply_with_animation(animation, **kwargs)

Reply directly to the incoming message with a animation

Source
reply_with_audio(audio, **kwargs)

Reply directly to the incoming message with a audio

Source
reply_with_basketball

Reply directly to the incoming message with a basketball

Source
reply_with_bowling

Reply directly to the incoming message with a bowling

Source
reply_with_contact(contact, **kwargs)

Reply directly to the incoming message with a contact

Source
reply_with_dart

Reply directly to the incoming message with a dart

Source
reply_with_dice

Reply directly to the incoming message with a dice

Source
reply_with_document(document, **kwargs)

Reply directly to the incoming message with a document

Source
reply_with_football

Reply directly to the incoming message with a football

Source
reply_with_invoice(invoice, **kwargs)

Reply directly to the incoming message with a invoice

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

Reply directly to the incoming message with a location

Source
reply_with_media_group(media_group, **kwargs)

Reply directly to the incoming message with a media_group

Source
reply_with_photo(photo, **kwargs)

Reply directly to the incoming message with a photo

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

Reply directly to the incoming message with a poll

Source
reply_with_slot_machine

Reply directly to the incoming message with a slot_machine

Source
reply_with_sticker(sticker, **kwargs)

Reply directly to the incoming message with a sticker

Source
reply_with_venue(venue, **kwargs)

Reply directly to the incoming message with a venue

Source
reply_with_video(video, **kwargs)

Reply directly to the incoming message with a video

Source
reply_with_video_note(video_note, **kwargs)

Reply directly to the incoming message with a video_note

Source
reply_with_voice(voice, **kwargs)

Reply directly to the incoming message with a voice

Source
respond(text : String, **kwargs)

Respond to the incoming message

Source
respond_with_animation(animation, **kwargs)

Respond with a animation

Source
respond_with_audio(audio, **kwargs)

Respond with a audio

Source
respond_with_basketball

Respond with a basketball

Source
respond_with_bowling

Respond with a bowling

Source
respond_with_contact(contact, **kwargs)

Respond with a contact

Source
respond_with_dart

Respond with a dart

Source
respond_with_dice

Respond with a dice

Source
respond_with_document(document, **kwargs)

Respond with a document

Source
respond_with_football

Respond with a football

Source
respond_with_invoice(invoice, **kwargs)

Respond with a invoice

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

Respond with a location

Source
respond_with_media_group(media_group, **kwargs)

Respond with a media_group

Source
respond_with_photo(photo, **kwargs)

Respond with a photo

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

Respond with a poll

Source
respond_with_slot_machine

Respond with a slot_machine

Source
respond_with_sticker(sticker, **kwargs)

Respond with a sticker

Source
respond_with_venue(venue, **kwargs)

Respond with a venue

Source
respond_with_video(video, **kwargs)

Respond with a video

Source
respond_with_video_note(video_note, **kwargs)

Respond with a video_note

Source
respond_with_voice(voice, **kwargs)

Respond with a voice

Source
send_chat_action(action : String | ChatAction)

Context aware chat actions

Source
shipping_query(*args, **options)

Pass all update methods to the update object

Source
shipping_query(*args, **options, &)

Pass all update methods to the update object

Source
shipping_query?(*args, **options)

Pass all update methods to the update object

Source
shipping_query?(*args, **options, &)

Pass all update methods to the update object

Source
text(strip_command = true)

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

Source
text!(strip_command = true)

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

Source
unpin_message

Context aware unpinning

Source
update
Source
with_message

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

Source