tgbot 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/api.yaml +175 -25
- data/lib/tgbot/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4676ef667b6214f5cedd77f3295bf5ffb4399caeaa0e8f4af8c6d9164a9085f
|
4
|
+
data.tar.gz: 9463ee9e8aa99b1b3184641d0ce36105146ba355e76709afc22d0de89f3e0b11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ef8b6cb2ad1249f10252d6290348fbd1bf681d10489d38788bcb7bd1fe9c7a638295429371cbc97c3bf2e4296ecd7d7176027366cb86292904ad9d0bcb2765d
|
7
|
+
data.tar.gz: 31fd99b3d70046233a20eb546a35a3ca1ba9b52f670042d5338e35132d0e60cc9d62982bc82960eb0802d2106bf0cb8d18ea54bc40e54fe56f26623bfc7e70b6
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Tgbot
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/tgbot.svg)](https://badge.fury.io/rb/tgbot)
|
4
|
-
![Bot API Version](https://img.shields.io/badge/Bot%20API-4.
|
4
|
+
![Bot API Version](https://img.shields.io/badge/Bot%20API-4.3-blue.svg?style=flat-square)
|
5
5
|
![](https://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat-square)
|
6
6
|
|
7
7
|
A tiny but easy-to-use wrapper of [Telegram Bot API](https://core.telegram.org/bots/api).
|
@@ -15,12 +15,12 @@ A tiny but easy-to-use wrapper of [Telegram Bot API](https://core.telegram.org/b
|
|
15
15
|
```ruby
|
16
16
|
Tgbot.run TOKEN, proxy: 'http://127.0.0.1:1080' do
|
17
17
|
on 'start' do
|
18
|
-
reply
|
18
|
+
reply "#{name}, at your service."
|
19
19
|
end
|
20
20
|
end
|
21
21
|
# or
|
22
22
|
bot = Tgbot.new TOKEN, proxy: 'http://127.0.0.1:1080'
|
23
|
-
bot.on('start'){ reply
|
23
|
+
bot.on('start'){ reply "#{name}, at your service." }
|
24
24
|
bot.run # will block current thread
|
25
25
|
```
|
26
26
|
|
data/lib/api.yaml
CHANGED
@@ -3,6 +3,38 @@ name: Telegram Bot API
|
|
3
3
|
children:
|
4
4
|
- name: Recent changes
|
5
5
|
children:
|
6
|
+
- name: May 31, 2019
|
7
|
+
children: []
|
8
|
+
desc:
|
9
|
+
- name: p
|
10
|
+
content: Bot API 4.3
|
11
|
+
- name: ul
|
12
|
+
content:
|
13
|
+
- Added support for Seamless Telegram Login on external websites (needs Telegram 5.7 or higher).
|
14
|
+
- 'Added the new object LoginUrl and the new field login_url to the InlineKeyboardButton object which allows to automatically authorize users before they go to a URL specified by the bot. Users will be asked to confirm authorization in their Telegram app (needs version 5.7 or higher) when they press the button:'
|
15
|
+
- name: p
|
16
|
+
content: 'Also in this update:'
|
17
|
+
- name: ul
|
18
|
+
content:
|
19
|
+
- Added the field reply_markup to the Message object, containing the inline keyboard attached to the message.
|
20
|
+
- If a message with an inline keyboard is forwarded, the forwarded message will now have an inline keyboard if the keyboard contained only url and login_url buttons or if the message was sent via a bot and the keyboard contained only url, login_url, switch_inline_query or switch_inline_query_current_chat buttons. In the latter case, switch_inline_query_current_chat buttons are replaced with switch_inline_query buttons.
|
21
|
+
- Bots now receive the edited_message Update even if only Message.reply_markup has changed.
|
22
|
+
- Bots that have the can_edit_messages right in a channel can now use the method editMessageReplyMarkup for messages written by other administrators forever without the 48 hours limit.
|
23
|
+
- 'Don''t forget that starting in July 2019, webhook requests from Bot API will be coming from the subnets 149.154.160.0/20 and 91.108.4.0/22. Most users won''t need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: https://core.telegram.org/bots/webhooks.'
|
24
|
+
- name: April 14, 2019
|
25
|
+
children: []
|
26
|
+
desc:
|
27
|
+
- name: p
|
28
|
+
content: Bot API 4.2
|
29
|
+
- name: ul
|
30
|
+
content:
|
31
|
+
- 'Added support for native polls: added the object Poll, the methods sendPoll and stopPoll and the field poll in the Message and Update objects.'
|
32
|
+
- The method deleteMessage can now be used to delete messages sent by a user to the bot in private chats within 48 hours.
|
33
|
+
- 'Added support for pinned messages in basic groups in addition to supergroups and channel chats: you can pass group''s chat_id to pinChatMessage and unpinChatMessage, and receive the pinned group message in Chat object.'
|
34
|
+
- Added the field is_member to the ChatMember object, which can be used to find whether a restricted user is a member of the chat.
|
35
|
+
- Added the field forward_sender_name to the Message object, containing name of the sender who has opted to hide their account.
|
36
|
+
- 'Starting in July 2019, webhook requests from Bot API will be coming from the subnets 149.154.160.0/20 and 91.108.4.0/22. Most users won''t need to do anything to continue receiving webhooks. If you control inbound access with a firewall, you may need to update your configuration. You can always find the list of actual IP addresses of servers used to send webhooks there: https://core.telegram.org/bots/webhooks.'
|
37
|
+
- Document thumbnails now should be inscribed in a 320x320 square instead of 90x90.
|
6
38
|
- name: August 27, 2018
|
7
39
|
children: []
|
8
40
|
desc:
|
@@ -105,6 +137,9 @@ children:
|
|
105
137
|
- Field: pre_checkout_query
|
106
138
|
Type: PreCheckoutQuery
|
107
139
|
Description: Optional. New incoming pre-checkout query. Contains full information about checkout
|
140
|
+
- Field: poll
|
141
|
+
Type: Poll
|
142
|
+
Description: Optional. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot
|
108
143
|
- name: getUpdates
|
109
144
|
children: []
|
110
145
|
desc:
|
@@ -263,7 +298,7 @@ children:
|
|
263
298
|
Description: Optional. Chat invite link, for supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat.
|
264
299
|
- Field: pinned_message
|
265
300
|
Type: Message
|
266
|
-
Description: Optional. Pinned message, for supergroups and
|
301
|
+
Description: Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat.
|
267
302
|
- Field: sticker_set_name
|
268
303
|
Type: String
|
269
304
|
Description: Optional. For supergroups, name of group sticker set. Returned only in getChat.
|
@@ -300,6 +335,9 @@ children:
|
|
300
335
|
- Field: forward_signature
|
301
336
|
Type: String
|
302
337
|
Description: Optional. For messages forwarded from channels, signature of the post author if present
|
338
|
+
- Field: forward_sender_name
|
339
|
+
Type: String
|
340
|
+
Description: Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages
|
303
341
|
- Field: forward_date
|
304
342
|
Type: Integer
|
305
343
|
Description: Optional. For forwarded messages, date the original message was sent in Unix time
|
@@ -363,6 +401,9 @@ children:
|
|
363
401
|
- Field: venue
|
364
402
|
Type: Venue
|
365
403
|
Description: Optional. Message is a venue, information about the venue
|
404
|
+
- Field: poll
|
405
|
+
Type: Poll
|
406
|
+
Description: Optional. Message is a native poll, information about the poll
|
366
407
|
- Field: new_chat_members
|
367
408
|
Type: Array of User
|
368
409
|
Description: Optional. New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
|
@@ -408,6 +449,9 @@ children:
|
|
408
449
|
- Field: passport_data
|
409
450
|
Type: PassportData
|
410
451
|
Description: Optional. Telegram Passport data
|
452
|
+
- Field: reply_markup
|
453
|
+
Type: InlineKeyboardMarkup
|
454
|
+
Description: Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
|
411
455
|
- name: MessageEntity
|
412
456
|
children: []
|
413
457
|
desc:
|
@@ -645,6 +689,36 @@ children:
|
|
645
689
|
- Field: foursquare_type
|
646
690
|
Type: String
|
647
691
|
Description: Optional. Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
|
692
|
+
- name: PollOption
|
693
|
+
children: []
|
694
|
+
desc:
|
695
|
+
- name: p
|
696
|
+
content: This object contains information about one answer option in a poll.
|
697
|
+
table:
|
698
|
+
- Field: text
|
699
|
+
Type: String
|
700
|
+
Description: Option text, 1-100 characters
|
701
|
+
- Field: voter_count
|
702
|
+
Type: Integer
|
703
|
+
Description: Number of users that voted for this option
|
704
|
+
- name: Poll
|
705
|
+
children: []
|
706
|
+
desc:
|
707
|
+
- name: p
|
708
|
+
content: This object contains information about a poll.
|
709
|
+
table:
|
710
|
+
- Field: id
|
711
|
+
Type: String
|
712
|
+
Description: Unique poll identifier
|
713
|
+
- Field: question
|
714
|
+
Type: String
|
715
|
+
Description: Poll question, 1-255 characters
|
716
|
+
- Field: options
|
717
|
+
Type: Array of PollOption
|
718
|
+
Description: List of poll options
|
719
|
+
- Field: is_closed
|
720
|
+
Type: Boolean
|
721
|
+
Description: True, if the poll is closed
|
648
722
|
- name: UserProfilePhotos
|
649
723
|
children: []
|
650
724
|
desc:
|
@@ -744,6 +818,9 @@ children:
|
|
744
818
|
- Field: url
|
745
819
|
Type: String
|
746
820
|
Description: Optional. HTTP or tg:// url to be opened when button is pressed
|
821
|
+
- Field: login_url
|
822
|
+
Type: LoginUrl
|
823
|
+
Description: Optional. An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
|
747
824
|
- Field: callback_data
|
748
825
|
Type: String
|
749
826
|
Description: Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
|
@@ -759,6 +836,28 @@ children:
|
|
759
836
|
- Field: pay
|
760
837
|
Type: Boolean
|
761
838
|
Description: 'Optional. Specify True, to send a Pay button.NOTE: This type of button must always be the first button in the first row.'
|
839
|
+
- name: LoginUrl
|
840
|
+
children: []
|
841
|
+
desc:
|
842
|
+
- name: p
|
843
|
+
content: 'This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:'
|
844
|
+
- name: p
|
845
|
+
content: Telegram apps support these buttons as of version 5.7.
|
846
|
+
- name: blockquote
|
847
|
+
content: 'Sample bot: @discussbot'
|
848
|
+
table:
|
849
|
+
- Field: url
|
850
|
+
Type: String
|
851
|
+
Description: 'An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.'
|
852
|
+
- Field: forward_text
|
853
|
+
Type: String
|
854
|
+
Description: Optional. New text of the button in forwarded messages.
|
855
|
+
- Field: bot_username
|
856
|
+
Type: String
|
857
|
+
Description: Optional. Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.
|
858
|
+
- Field: request_write_access
|
859
|
+
Type: Boolean
|
860
|
+
Description: Optional. Pass True to request the permission for your bot to send messages to the user.
|
762
861
|
- name: CallbackQuery
|
763
862
|
children: []
|
764
863
|
desc:
|
@@ -858,10 +957,13 @@ children:
|
|
858
957
|
Description: Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members
|
859
958
|
- Field: can_pin_messages
|
860
959
|
Type: Boolean
|
861
|
-
Description: Optional. Administrators only. True, if the administrator can pin messages, supergroups only
|
960
|
+
Description: Optional. Administrators only. True, if the administrator can pin messages, groups and supergroups only
|
862
961
|
- Field: can_promote_members
|
863
962
|
Type: Boolean
|
864
963
|
Description: Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
|
964
|
+
- Field: is_member
|
965
|
+
Type: Boolean
|
966
|
+
Description: Optional. Restricted only. True, if the user is a member of the chat at the moment of the request
|
865
967
|
- Field: can_send_messages
|
866
968
|
Type: Boolean
|
867
969
|
Description: Optional. Restricted only. True, if the user can send text messages, contacts, locations and venues
|
@@ -930,7 +1032,7 @@ children:
|
|
930
1032
|
Description: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
|
931
1033
|
- Field: thumb
|
932
1034
|
Type: InputFile or String
|
933
|
-
Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1035
|
+
Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
934
1036
|
- Field: caption
|
935
1037
|
Type: String
|
936
1038
|
Description: Optional. Caption of the video to be sent, 0-1024 characters
|
@@ -963,7 +1065,7 @@ children:
|
|
963
1065
|
Description: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
|
964
1066
|
- Field: thumb
|
965
1067
|
Type: InputFile or String
|
966
|
-
Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1068
|
+
Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
967
1069
|
- Field: caption
|
968
1070
|
Type: String
|
969
1071
|
Description: Optional. Caption of the animation to be sent, 0-1024 characters
|
@@ -993,7 +1095,7 @@ children:
|
|
993
1095
|
Description: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
|
994
1096
|
- Field: thumb
|
995
1097
|
Type: InputFile or String
|
996
|
-
Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1098
|
+
Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
997
1099
|
- Field: caption
|
998
1100
|
Type: String
|
999
1101
|
Description: Optional. Caption of the audio to be sent, 0-1024 characters
|
@@ -1023,7 +1125,7 @@ children:
|
|
1023
1125
|
Description: File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More info on Sending Files »
|
1024
1126
|
- Field: thumb
|
1025
1127
|
Type: InputFile or String
|
1026
|
-
Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1128
|
+
Description: Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
1027
1129
|
- Field: caption
|
1028
1130
|
Type: String
|
1029
1131
|
Description: Optional. Caption of the document to be sent, 0-1024 characters
|
@@ -1257,7 +1359,7 @@ children:
|
|
1257
1359
|
- Parameter: thumb
|
1258
1360
|
Type: InputFile or String
|
1259
1361
|
Required: Optional
|
1260
|
-
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1362
|
+
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
1261
1363
|
- Parameter: disable_notification
|
1262
1364
|
Type: Boolean
|
1263
1365
|
Required: Optional
|
@@ -1287,7 +1389,7 @@ children:
|
|
1287
1389
|
- Parameter: thumb
|
1288
1390
|
Type: InputFile or String
|
1289
1391
|
Required: Optional
|
1290
|
-
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1392
|
+
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
1291
1393
|
- Parameter: caption
|
1292
1394
|
Type: String
|
1293
1395
|
Required: Optional
|
@@ -1337,7 +1439,7 @@ children:
|
|
1337
1439
|
- Parameter: thumb
|
1338
1440
|
Type: InputFile or String
|
1339
1441
|
Required: Optional
|
1340
|
-
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1442
|
+
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
1341
1443
|
- Parameter: caption
|
1342
1444
|
Type: String
|
1343
1445
|
Required: Optional
|
@@ -1391,7 +1493,7 @@ children:
|
|
1391
1493
|
- Parameter: thumb
|
1392
1494
|
Type: InputFile or String
|
1393
1495
|
Required: Optional
|
1394
|
-
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1496
|
+
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
1395
1497
|
- Parameter: caption
|
1396
1498
|
Type: String
|
1397
1499
|
Required: Optional
|
@@ -1475,7 +1577,7 @@ children:
|
|
1475
1577
|
- Parameter: thumb
|
1476
1578
|
Type: InputFile or String
|
1477
1579
|
Required: Optional
|
1478
|
-
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed
|
1580
|
+
Description: Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More info on Sending Files »
|
1479
1581
|
- Parameter: disable_notification
|
1480
1582
|
Type: Boolean
|
1481
1583
|
Required: Optional
|
@@ -1548,7 +1650,7 @@ children:
|
|
1548
1650
|
children: []
|
1549
1651
|
desc:
|
1550
1652
|
- name: p
|
1551
|
-
content: Use this method to edit live location messages
|
1653
|
+
content: Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message was sent by the bot, the edited Message is returned, otherwise True is returned.
|
1552
1654
|
table:
|
1553
1655
|
- Parameter: chat_id
|
1554
1656
|
Type: Integer or String
|
@@ -1557,7 +1659,7 @@ children:
|
|
1557
1659
|
- Parameter: message_id
|
1558
1660
|
Type: Integer
|
1559
1661
|
Required: Optional
|
1560
|
-
Description: Required if inline_message_id is not specified. Identifier of the
|
1662
|
+
Description: Required if inline_message_id is not specified. Identifier of the message to edit
|
1561
1663
|
- Parameter: inline_message_id
|
1562
1664
|
Type: String
|
1563
1665
|
Required: Optional
|
@@ -1578,7 +1680,7 @@ children:
|
|
1578
1680
|
children: []
|
1579
1681
|
desc:
|
1580
1682
|
- name: p
|
1581
|
-
content: Use this method to stop updating a live location message
|
1683
|
+
content: Use this method to stop updating a live location message before live_period expires. On success, if the message was sent by the bot, the sent Message is returned, otherwise True is returned.
|
1582
1684
|
table:
|
1583
1685
|
- Parameter: chat_id
|
1584
1686
|
Type: Integer or String
|
@@ -1587,7 +1689,7 @@ children:
|
|
1587
1689
|
- Parameter: message_id
|
1588
1690
|
Type: Integer
|
1589
1691
|
Required: Optional
|
1590
|
-
Description: Required if inline_message_id is not specified. Identifier of the
|
1692
|
+
Description: Required if inline_message_id is not specified. Identifier of the message with live location to stop
|
1591
1693
|
- Parameter: inline_message_id
|
1592
1694
|
Type: String
|
1593
1695
|
Required: Optional
|
@@ -1680,6 +1782,36 @@ children:
|
|
1680
1782
|
Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
|
1681
1783
|
Required: Optional
|
1682
1784
|
Description: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove keyboard or to force a reply from the user.
|
1785
|
+
- name: sendPoll
|
1786
|
+
children: []
|
1787
|
+
desc:
|
1788
|
+
- name: p
|
1789
|
+
content: Use this method to send a native poll. A native poll can't be sent to a private chat. On success, the sent Message is returned.
|
1790
|
+
table:
|
1791
|
+
- Parameter: chat_id
|
1792
|
+
Type: Integer or String
|
1793
|
+
Required: 'Yes'
|
1794
|
+
Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername). A native poll can't be sent to a private chat.
|
1795
|
+
- Parameter: question
|
1796
|
+
Type: String
|
1797
|
+
Required: 'Yes'
|
1798
|
+
Description: Poll question, 1-255 characters
|
1799
|
+
- Parameter: options
|
1800
|
+
Type: Array of String
|
1801
|
+
Required: 'Yes'
|
1802
|
+
Description: List of answer options, 2-10 strings 1-100 characters each
|
1803
|
+
- Parameter: disable_notification
|
1804
|
+
Type: Boolean
|
1805
|
+
Required: Optional
|
1806
|
+
Description: Sends the message silently. Users will receive a notification with no sound.
|
1807
|
+
- Parameter: reply_to_message_id
|
1808
|
+
Type: Integer
|
1809
|
+
Required: Optional
|
1810
|
+
Description: If the message is a reply, ID of the original message
|
1811
|
+
- Parameter: reply_markup
|
1812
|
+
Type: InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply
|
1813
|
+
Required: Optional
|
1814
|
+
Description: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
|
1683
1815
|
- name: sendChatAction
|
1684
1816
|
children: []
|
1685
1817
|
desc:
|
@@ -1916,7 +2048,7 @@ children:
|
|
1916
2048
|
children: []
|
1917
2049
|
desc:
|
1918
2050
|
- name: p
|
1919
|
-
content: Use this method to pin a message in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
|
2051
|
+
content: Use this method to pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
|
1920
2052
|
table:
|
1921
2053
|
- Parameter: chat_id
|
1922
2054
|
Type: Integer or String
|
@@ -1934,7 +2066,7 @@ children:
|
|
1934
2066
|
children: []
|
1935
2067
|
desc:
|
1936
2068
|
- name: p
|
1937
|
-
content: Use this method to unpin a message in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
|
2069
|
+
content: Use this method to unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the ‘can_pin_messages’ admin right in the supergroup or ‘can_edit_messages’ admin right in the channel. Returns True on success.
|
1938
2070
|
table:
|
1939
2071
|
- Parameter: chat_id
|
1940
2072
|
Type: Integer or String
|
@@ -2060,7 +2192,7 @@ children:
|
|
2060
2192
|
children: []
|
2061
2193
|
desc:
|
2062
2194
|
- name: p
|
2063
|
-
content: Use this method to edit text and game messages
|
2195
|
+
content: Use this method to edit text and game messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
|
2064
2196
|
table:
|
2065
2197
|
- Parameter: chat_id
|
2066
2198
|
Type: Integer or String
|
@@ -2069,7 +2201,7 @@ children:
|
|
2069
2201
|
- Parameter: message_id
|
2070
2202
|
Type: Integer
|
2071
2203
|
Required: Optional
|
2072
|
-
Description: Required if inline_message_id is not specified. Identifier of the
|
2204
|
+
Description: Required if inline_message_id is not specified. Identifier of the message to edit
|
2073
2205
|
- Parameter: inline_message_id
|
2074
2206
|
Type: String
|
2075
2207
|
Required: Optional
|
@@ -2094,7 +2226,7 @@ children:
|
|
2094
2226
|
children: []
|
2095
2227
|
desc:
|
2096
2228
|
- name: p
|
2097
|
-
content: Use this method to edit captions of messages
|
2229
|
+
content: Use this method to edit captions of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
|
2098
2230
|
table:
|
2099
2231
|
- Parameter: chat_id
|
2100
2232
|
Type: Integer or String
|
@@ -2103,7 +2235,7 @@ children:
|
|
2103
2235
|
- Parameter: message_id
|
2104
2236
|
Type: Integer
|
2105
2237
|
Required: Optional
|
2106
|
-
Description: Required if inline_message_id is not specified. Identifier of the
|
2238
|
+
Description: Required if inline_message_id is not specified. Identifier of the message to edit
|
2107
2239
|
- Parameter: inline_message_id
|
2108
2240
|
Type: String
|
2109
2241
|
Required: Optional
|
@@ -2133,7 +2265,7 @@ children:
|
|
2133
2265
|
- Parameter: message_id
|
2134
2266
|
Type: Integer
|
2135
2267
|
Required: Optional
|
2136
|
-
Description: Required if inline_message_id is not specified. Identifier of the
|
2268
|
+
Description: Required if inline_message_id is not specified. Identifier of the message to edit
|
2137
2269
|
- Parameter: inline_message_id
|
2138
2270
|
Type: String
|
2139
2271
|
Required: Optional
|
@@ -2150,7 +2282,7 @@ children:
|
|
2150
2282
|
children: []
|
2151
2283
|
desc:
|
2152
2284
|
- name: p
|
2153
|
-
content: Use this method to edit only the reply markup of messages
|
2285
|
+
content: Use this method to edit only the reply markup of messages. On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
|
2154
2286
|
table:
|
2155
2287
|
- Parameter: chat_id
|
2156
2288
|
Type: Integer or String
|
@@ -2159,7 +2291,7 @@ children:
|
|
2159
2291
|
- Parameter: message_id
|
2160
2292
|
Type: Integer
|
2161
2293
|
Required: Optional
|
2162
|
-
Description: Required if inline_message_id is not specified. Identifier of the
|
2294
|
+
Description: Required if inline_message_id is not specified. Identifier of the message to edit
|
2163
2295
|
- Parameter: inline_message_id
|
2164
2296
|
Type: String
|
2165
2297
|
Required: Optional
|
@@ -2168,11 +2300,29 @@ children:
|
|
2168
2300
|
Type: InlineKeyboardMarkup
|
2169
2301
|
Required: Optional
|
2170
2302
|
Description: A JSON-serialized object for an inline keyboard.
|
2303
|
+
- name: stopPoll
|
2304
|
+
children: []
|
2305
|
+
desc:
|
2306
|
+
- name: p
|
2307
|
+
content: Use this method to stop a poll which was sent by the bot. On success, the stopped Poll with the final results is returned.
|
2308
|
+
table:
|
2309
|
+
- Parameter: chat_id
|
2310
|
+
Type: Integer or String
|
2311
|
+
Required: 'Yes'
|
2312
|
+
Description: Unique identifier for the target chat or username of the target channel (in the format @channelusername)
|
2313
|
+
- Parameter: message_id
|
2314
|
+
Type: Integer
|
2315
|
+
Required: 'Yes'
|
2316
|
+
Description: Identifier of the original message with the poll
|
2317
|
+
- Parameter: reply_markup
|
2318
|
+
Type: InlineKeyboardMarkup
|
2319
|
+
Required: Optional
|
2320
|
+
Description: A JSON-serialized object for a new message inline keyboard.
|
2171
2321
|
- name: deleteMessage
|
2172
2322
|
children: []
|
2173
2323
|
desc:
|
2174
2324
|
- name: p
|
2175
|
-
content: Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots granted can_post_messages permissions can delete outgoing messages in channels.- If the bot is an administrator of a group, it can delete any message there.- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.Returns True on success.
|
2325
|
+
content: Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots can delete incoming messages in private chats.- Bots granted can_post_messages permissions can delete outgoing messages in channels.- If the bot is an administrator of a group, it can delete any message there.- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.Returns True on success.
|
2176
2326
|
table:
|
2177
2327
|
- Parameter: chat_id
|
2178
2328
|
Type: Integer or String
|
data/lib/tgbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tgbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hyrious
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
rubygems_version: 3.0.
|
107
|
+
rubygems_version: 3.0.3
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Telegram Bot API
|