module Telecr

Defined in:

api/client.cr
api/types.cr
core/bot.cr
core/composer.cr
core/context.cr
core/handler.cr
core/middleware.cr
markup/inline.cr
markup/keyboard.cr
plugins/rate_limit.cr
plugins/upload_shrine.cr
session/memory_store.cr
session/middleware.cr
telecr.cr
webhook/webhook.cr

Constant Summary

VERSION = "0.1.0"

Library version

Constructors

Class Method Summary

Constructor Detail

def self.new(token : String) #

Create a new bot instance

@param token [String] Telegram bot token @return [Core::Bot] Bot instance


[View source]

Class Method Detail

def self.force_reply(**options) #

Create force reply markup

@param options [Hash] Force reply options @return [Hash] Force reply markup


[View source]
def self.inline(&block : Markup::InlineBuilder -> ) #

Create an inline keyboard

@yield [Markup::InlineBuilder] Keyboard builder @return [Markup::InlineKeyboard] Keyboard markup


[View source]
def self.keyboard(&block : Markup::ReplyBuilder -> ) #

Create a reply keyboard

@yield [Markup::ReplyBuilder] Keyboard builder @return [Markup::ReplyKeyboard] Keyboard markup


[View source]
def self.remove_keyboard(**options) #

Create remove keyboard markup

@param options [Hash] Keyboard options @return [Hash] Remove keyboard markup


[View source]
def self.version #

Get library version

@return [String] Version number


[View source]
def self.webhook(bot : Core::Bot, **options) #

Set up webhook for bot (convenience method)

@param bot [Core::Bot] Bot instance @param options [Hash] Webhook options @return [Webhook::Server] Webhook server


[View source]