class TelegramBot::Client
- TelegramBot::Client
- Reference
- Object
Defined in:
telegram_bot.crConstant Summary
-
Log =
TelegramBot::Log.for("client")
Constructors
Instance Method Summary
-
#delete_message(chat_id : Int64 | String, message_id : Int32)
https://core.telegram.org/bots/api#deletemessage
-
#delete_webhook
https://core.telegram.org/bots/api#deletewebhook
- #download_file(file_path : String)
- #download_file(file_path : String, &block : HTTP::Client::Response -> Nil)
-
#edit_message_reply_markup(chat_id : Int64 | String | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil, reply_markup : Models::InlineKeyboardMarkup | Nil = nil)
https://core.telegram.org/bots/api#editmessagereplymarkup
-
#edit_message_text(text : String, chat_id : Int64 | String | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil, parse_mode : ParseMode | String | Nil = nil, disable_web_page_preview : Bool | Nil = nil, reply_markup : Models::InlineKeyboardMarkup | Nil = nil)
https://core.telegram.org/bots/api#editmessagetext
- #finalize
-
#forward_message(chat_id : Int64 | String, from_chat_id : Int64 | String, message_id : Int32, disable_notification : Bool | Nil = nil)
https://core.telegram.org/bots/api#forwardmessage
- #get_chat_members_count(chat_id : Int64 | String)
- #get_file(file_id : String)
-
#get_me
https://core.telegram.org/bots/api#getme
-
#get_updates(offset : Int32 | Nil = nil, limit : Int32 | Nil = nil, timeout : Int32 | Nil = nil, allowed_updates : Array(String) | Nil = nil)
https://core.telegram.org/bots/api#getupdates
-
#get_webhook_info
https://core.telegram.org/bots/api#getwebhookinfo
-
#listen(&)
NOTE Avoid using this method.
-
#send_chat_action(chat_id : Int64 | String, action : String)
https://core.telegram.org/bots/api#sendchataction
-
#send_contact(chat_id : Int64 | String, phone_number : String, first_name : String, last_name : String | Nil = nil, vcard : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_to_message_id : Int32 | Nil = nil, reply_markup : Models::ReplyMarkup | Nil = nil)
https://core.telegram.org/bots/api#sendcontact
-
#send_location(chat_id : Int64 | String, latitude : Float64, longitude : Float64, live_period : Int32 | Nil = nil, disable_notification : Bool | Nil = nil, reply_to_message_id : Int32 | Nil = nil, reply_markup : Models::ReplyMarkup | Nil = nil)
https://core.telegram.org/bots/api#sendlocation
-
#send_media_group(chat_id : Int64 | String, media : Array(Models::InputMedia), disable_notification : Bool | Nil = nil, reply_to_message_id : Int32 | Nil = nil, allow_sending_without_reply : Bool | Nil = nil)
TODO Implement media : Array(String | IO) https://core.telegram.org/bots/api#sendmediagroup
-
#send_message(chat_id : Int64 | String, text : String, parse_mode : ParseMode | String | Nil = nil, disable_web_page_preview : Bool | Nil = nil, disable_notification : Bool | Nil = nil, reply_to_message_id : Int32 | Nil = nil, reply_markup : Models::ReplyMarkup | Nil = nil)
https://core.telegram.org/bots/api#sendmessage
-
#send_photo(chat_id : Int64 | String, photo : String, caption : String | Nil = nil, parse_mode : ParseMode | String | Nil = nil, disable_notification : Bool | Nil = nil, reply_to_message_id : Int32 | Nil = nil, reply_markup : Models::ReplyMarkup | Nil = nil)
https://core.telegram.org/bots/api#sendphoto
- #send_photo(chat_id : Int64 | String, photo : IO, caption : String | Nil = nil, parse_mode : ParseMode | String | Nil = nil, disable_notification : Bool | Nil = nil, reply_to_message_id : Int32 | Nil = nil, reply_markup : Models::ReplyMarkup | Nil = nil)
-
#send_video(chat_id : Int64 | String, video : String, duration : Int64 | Nil = nil, width : Int64 | Nil = nil, height : Int64 | Nil = nil, caption : String | Nil = nil, parse_mode : ParseMode | String | Nil = nil, disable_notification : Bool | Nil = nil, reply_to_message_id : Int32 | Nil = nil, reply_markup : Models::ReplyMarkup | Nil = nil)
https://core.telegram.org/bots/api#sendvideo
-
#send_video(chat_id : Int64 | String, video : IO, duration : Int64 | Nil = nil, width : Int64 | Nil = nil, height : Int64 | Nil = nil, caption : String | Nil = nil, parse_mode : ParseMode | String | Nil = nil, disable_notification : Bool | Nil = nil, reply_to_message_id : Int32 | Nil = nil, reply_markup : Models::ReplyMarkup | Nil = nil)
https://core.telegram.org/bots/api#sendvideo
- #set_my_commands(commands : Array(Models::BotCommand))
-
#set_webhook(url : String, certificate : IO | Nil = nil, max_connections : Int32 | Nil = nil, allowed_updates : Array(String) | Nil = nil)
https://core.telegram.org/bots/api#setwebhook
- #token : String
Constructor Detail
Instance Method Detail
https://core.telegram.org/bots/api#deletemessage
https://core.telegram.org/bots/api#editmessagereplymarkup
https://core.telegram.org/bots/api#editmessagetext
https://core.telegram.org/bots/api#forwardmessage
https://core.telegram.org/bots/api#getupdates
https://core.telegram.org/bots/api#sendchataction
https://core.telegram.org/bots/api#sendcontact
https://core.telegram.org/bots/api#sendlocation
TODO Implement media : Array(String | IO) https://core.telegram.org/bots/api#sendmediagroup
https://core.telegram.org/bots/api#sendmessage
https://core.telegram.org/bots/api#setwebhook