struct Tourmaline::Context

Defined in:

tourmaline/context.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def answer_query(*args, **kwargs) #

Context aware query answer


[View source]
def api : Tourmaline::Client #

Slightly shorter alias for the client


[View source]
def callback_query(*args, **options) #

Pass all update methods to the update object


[View source]
def callback_query(*args, **options, &) #

Pass all update methods to the update object


[View source]
def callback_query?(*args, **options) #

Pass all update methods to the update object


[View source]
def callback_query?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def channel_post(*args, **options) #

Pass all update methods to the update object


[View source]
def channel_post(*args, **options, &) #

Pass all update methods to the update object


[View source]
def channel_post?(*args, **options) #

Pass all update methods to the update object


[View source]
def channel_post?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def chosen_inline_result(*args, **options) #

Pass all update methods to the update object


[View source]
def chosen_inline_result(*args, **options, &) #

Pass all update methods to the update object


[View source]
def chosen_inline_result?(*args, **options) #

Pass all update methods to the update object


[View source]
def chosen_inline_result?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def client : Client #

[View source]
def command #

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


[View source]
def command! #

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


[View source]
def delete_message(message_id : Int32) #

Context aware message deletion


[View source]
def edited_channel_post(*args, **options) #

Pass all update methods to the update object


[View source]
def edited_channel_post(*args, **options, &) #

Pass all update methods to the update object


[View source]
def edited_channel_post?(*args, **options) #

Pass all update methods to the update object


[View source]
def edited_channel_post?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def edited_message(*args, **options) #

Pass all update methods to the update object


[View source]
def edited_message(*args, **options, &) #

Pass all update methods to the update object


[View source]
def edited_message?(*args, **options) #

Pass all update methods to the update object


[View source]
def edited_message?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def forward_message(to_chat, **args) #

Context aware forward


[View source]
def inline_query(*args, **options) #

Pass all update methods to the update object


[View source]
def inline_query(*args, **options, &) #

Pass all update methods to the update object


[View source]
def inline_query?(*args, **options) #

Pass all update methods to the update object


[View source]
def inline_query?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def message #

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


[View source]
def message(*args, **options) #

Pass all update methods to the update object


[View source]
def message(*args, **options, &) #

Pass all update methods to the update object


[View source]
def message! #

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


[View source]
def message?(*args, **options) #

Pass all update methods to the update object


[View source]
def message?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def pin_message(**args) #

Context aware pinning


[View source]
def poll(*args, **options) #

Pass all update methods to the update object


[View source]
def poll(*args, **options, &) #

Pass all update methods to the update object


[View source]
def poll?(*args, **options) #

Pass all update methods to the update object


[View source]
def poll?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def poll_answer(*args, **options) #

Pass all update methods to the update object


[View source]
def poll_answer(*args, **options, &) #

Pass all update methods to the update object


[View source]
def poll_answer?(*args, **options) #

Pass all update methods to the update object


[View source]
def poll_answer?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def pre_checkout_query(*args, **options) #

Pass all update methods to the update object


[View source]
def pre_checkout_query(*args, **options, &) #

Pass all update methods to the update object


[View source]
def pre_checkout_query?(*args, **options) #

Pass all update methods to the update object


[View source]
def pre_checkout_query?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def reply(text : String, **kwargs) #

Reply directly to the incoming message


[View source]
def reply_with_animation(*args, **kwargs) #

Reply directly to the incoming message with a animation


[View source]
def reply_with_audio(*args, **kwargs) #

Reply directly to the incoming message with a audio


[View source]
def reply_with_basketball(*args, **kwargs) #

Reply directly to the incoming message with a basketball


[View source]
def reply_with_contact(*args, **kwargs) #

Reply directly to the incoming message with a contact


[View source]
def reply_with_dart(*args, **kwargs) #

Reply directly to the incoming message with a dart


[View source]
def reply_with_dice(*args, **kwargs) #

Reply directly to the incoming message with a dice


[View source]
def reply_with_document(*args, **kwargs) #

Reply directly to the incoming message with a document


[View source]
def reply_with_invoice(*args, **kwargs) #

Reply directly to the incoming message with a invoice


[View source]
def reply_with_location(*args, **kwargs) #

Reply directly to the incoming message with a location


[View source]
def reply_with_media_group(*args, **kwargs) #

Reply directly to the incoming message with a media_group


[View source]
def reply_with_photo(*args, **kwargs) #

Reply directly to the incoming message with a photo


[View source]
def reply_with_poll(*args, **kwargs) #

Reply directly to the incoming message with a poll


[View source]
def reply_with_sticker(*args, **kwargs) #

Reply directly to the incoming message with a sticker


[View source]
def reply_with_venu(*args, **kwargs) #

Reply directly to the incoming message with a venu


[View source]
def reply_with_video(*args, **kwargs) #

Reply directly to the incoming message with a video


[View source]
def reply_with_video_note(*args, **kwargs) #

Reply directly to the incoming message with a video_note


[View source]
def reply_with_voice(*args, **kwargs) #

Reply directly to the incoming message with a voice


[View source]
def respond(text : String, **kwargs) #

Respond to the incoming message


[View source]
def respond_with_animation(*args, **kwargs) #

Respond with a animation


[View source]
def respond_with_audio(*args, **kwargs) #

Respond with a audio


[View source]
def respond_with_basketball(*args, **kwargs) #

Respond with a basketball


[View source]
def respond_with_contact(*args, **kwargs) #

Respond with a contact


[View source]
def respond_with_dart(*args, **kwargs) #

Respond with a dart


[View source]
def respond_with_dice(*args, **kwargs) #

Respond with a dice


[View source]
def respond_with_document(*args, **kwargs) #

Respond with a document


[View source]
def respond_with_invoice(*args, **kwargs) #

Respond with a invoice


[View source]
def respond_with_location(*args, **kwargs) #

Respond with a location


[View source]
def respond_with_media_group(*args, **kwargs) #

Respond with a media_group


[View source]
def respond_with_photo(*args, **kwargs) #

Respond with a photo


[View source]
def respond_with_poll(*args, **kwargs) #

Respond with a poll


[View source]
def respond_with_sticker(*args, **kwargs) #

Respond with a sticker


[View source]
def respond_with_venu(*args, **kwargs) #

Respond with a venu


[View source]
def respond_with_video(*args, **kwargs) #

Respond with a video


[View source]
def respond_with_video_note(*args, **kwargs) #

Respond with a video_note


[View source]
def respond_with_voice(*args, **kwargs) #

Respond with a voice


[View source]
def send_chat_action(action : ChatAction) #

Context aware chat actions


[View source]
def shipping_query(*args, **options) #

Pass all update methods to the update object


[View source]
def shipping_query(*args, **options, &) #

Pass all update methods to the update object


[View source]
def shipping_query?(*args, **options) #

Pass all update methods to the update object


[View source]
def shipping_query?(*args, **options, &) #

Pass all update methods to the update object


[View source]
def text(strip_command = true) #

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


[View source]
def text!(strip_command = true) #

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


[View source]
def unpin_message(**args) #

Context aware unpinning


[View source]
def update : Update #

[View source]
def with_message(&) #

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


[View source]